Mega Code Archive

 
Categories / Perl / Regular Expression
 

Check for white space

#!/usr/bin/perl -w foreach $patt (@ARGV) {     # Check for white space.     if ($patt =~ /\s/) {         print "\tFound white space in \"$patt\".\n";     } }