change that to be:Broken: while ($line = <READTHIS>) { if ($line =~ /cat/) { print "yeppers!"; } }</I>
Keep in mind, you are going to get any match on cat like "catching" a cold...I dunno if you wanted that or not. If you don't mind me asking, what was your intent for the script? I was trying to figure out what you were up to with the search and replace lines. In some of those you are searching for a set of characters and replacing them with the identical data.while(<READTHIS>){ if($_ =~ /cat/) { print "Yeppers!\n" } else{ print $_; }
In reply to RE: reg ex matching 101
by 2501
in thread reg ex matching 101
by NotProud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |