That construct is tres-weird. I didn't even know it would work. Learn something new. :) I'd say, just use =~ like Dog intended.
Update: the warning in 5.10 is a bit more informative than the one in 5.8 too: "Useless use of negative pattern binding (!~) in void context at -e line 1."perl -wle '$str = "not junk"; $str !~ s/junk//g; print $str' Useless use of not in void context at -e line 1. not perl -wle '$str = "not junk"; $str =~ s/junk//g; print $str' not
In reply to Re: Is there a better way of dealing with !~ and "Useless use of not in void context at" warnings?
by Your Mother
in thread Is there a better way of dealing with !~ and "Useless use of not in void context at" warnings?
by Plankton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |