Specifying Patterns (Cont.)
$test = "You have new mail -- 11-13-00";
if ($test =~ /^You\s.+\d+-\d+-\d+/ ) {
print "The mail has arrived."; }
if ($test =~
m(
^
You
\s
.+
\d+
-
\d+
-
\d+
)
{ print "The mail has arrived."; }
Previous slide
Next slide
Back to first slide
View graphic version