![]() |
Determining a negative match
Hey i have a program where i needed to determine if something didnt match.
I originally tried using !=~ but no matter how many times i entered the string to match, it wouldnt work. i eventually replaced it with the not on the outside of the match and it now works. I would like to know why did !=~ fail to do what i wanted. This doesnt Work :
This Works :
$k = ""My question is whats the difference |
It's been a while since I've used perl, but I believe !~ is the correct operator to use.
|
Yep, !~ would work. The other issue was probably due to operator precedence, etc.
|
| All times are GMT -5. The time now is 8:21 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC