in reply to substitution (s///)
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: substitution (s///)
by djantzen (Priest) on Dec 02, 2002 at 12:57 UTC |