Please send questions to
st10@humboldt.edu .
#!/usr/bin/perl -w
#######################################################
# lab03_wildcard1
#
# using simple patterns with wildcard . (dot)
#
# see which lines contain mist followed by any other character
# followed by r --- also see which contain 9.9
#
# modified by Sharon Tuttle from "Learning Perl",
# by Schartz and Phoenix
#
# last modified: 9-7-04
#######################################################
while (<>)
{
chomp;
# see if $_ contains mist, any character, r
if (/mist.r/)
{
printf "line with mist.r:<%s>\n", $_;
}
# see if $_ contains 9.9
if (/9\.9/)
{
printf "line with 9.9:<%s>\n", $_;
}
# see if $_ contains a backslash
if (/\\/)
{
printf "line with a backslash:<%s>\n", $_;
}
}
# end of lab03_wildcard1