

$alpha_chars    = "This is a string"; # a string of aphabetical characters
$digits         = 60637;              # a string of digits
$white_space    = "	\t \f";           # a string of white-space characters 
									  # (return and newline omitted)
$non_word_chars = ".;\$:-,\"\'";       # a string of non-word characters
                                      # note: white-space characters are also non-word


foreach $test ($alpha_chars, $digits, $white_space, $non_word_chars)
{

	if ($test =~ /\w/) # test for word (alpha-numerical) characters
	{
		print "Test string \'$test\' contains alphanumerical characters.\n";
	}
	else
	{
		print "Test string \'$test\' does not contain alphanumerical characters.\n";
	}



	if ($test =~ /\d/) # test for digits
	{
		print "Test string \'$test\' contains digits.\n";
	}
	else
	{
		print "Test string \'$test\' does not contain digits.\n";
	}


	
	if ($test =~ /\s/) # test for white-space characters
	{
		print "Test string \'$test\' contains white-space characters.\n";
	}
	else
	{
		print "Test string \'$test\' does not contain white-space characters.\n";
	}
	

	
	if ($test =~ /\W/) # test for non-word charcters
	{
		print "Test string \'$test\' contains non-word characters.\n";
	}
	else
	{
		print "Test string \'$test\' does not contain non-word characters.\n";
	}

	print "-" x 75 . "\n";
}