Regular Expressions in Perl
In Perl, regular expressions are used to specify patterns for pattern matching.
$sentence = ”Winter weather has arrived."
if ($sentence =~ /weather/) {
print "Never bet on the weather." ;
The result of this kind of pattern matching is a true or false value.