It doesn't handle word boundaries, as you mention, but I don't see much of a difference between the magical assignment to $_ and the explicit assignment to $line.
Besides that, you could just use print "Yeppers!" if /cat/; and print;.
If I'm missing something here, please enlighten me.
In reply to RE: RE: reg ex matching 101
by chromatic
in thread reg ex matching 101
by NotProud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |