Mega Code Archive

 
Categories / Perl / Regular Expression
 

Pattern-Matching Operators(The syntax used to perform a pattern match on a string)

# The syntax used to perform a pattern match on a string is $string =~ /regular expression/expression modifier (optional)             #!/usr/local/bin/perl -w                  while (<STDIN>)          {           print if ($_ =~ /the/);       }