When you use s/// (and many other Perl constructs) in "void context" - w/o arguments, it assumes the $_ var is its argument. The regext in the if() doesn't insert anything into $_, so you get the warning.
It's best to be explicit... supply s/// with the var you want the substitution on, then you won't have to scratch your head for too long trying to understand bugs like this.
In reply to Re: substitution (s///)
by spurperl
in thread substitution (s///)
by matth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |