![]() |
|
"be consistent" | |
PerlMonks |
Re: checking the end of lineby dimmesdale (Friar) |
on Jul 19, 2002 at 22:38 UTC ( #183487=note: print w/replies, xml ) | Need Help?? |
if ($path == 0)
Remember, you said $path was: 'hiec/by/mlor/kkss23/dndd@@mani/css.cpp/0'. Try something like this:
Note that what you used never captured the resulting match (that is, it was used in void context and had not side effects). Using the parentheses like I do, it sets the $1 variable (see perlre) -- note, too, that it also returns the value which I check, so you can say something like $my_value = ...regex_here...
In Section
Seekers of Perl Wisdom
|
|