Specifying Patterns (Cont.)
$test = "You have new mail -- 11-12-03";
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