What error does it produce on your machine?
On mine, the array slice is necessary to put the regex in list context
so that it returns the captured string instead of the true or false value it returns in scalar context | [reply] |
Syntax error becuase of )[
With the parens around JUST the regex it works (but returns a 1).
Assigning the results to an array or using the $1 variable, however, would get around this if the user is having any problems ...
Has anyone else been having problems with PM? I checked my firewall, and it seems that the banners up top keep 'timing-out', so the whole page takes forever to load.
| [reply] [d/l] |
If you're getting a syntax error, perhaps you typed it in wrong.
Perhaps you meant
if($path =~ /(\d+)$/ == 0) {
print "No number found\n";
} else {
print "number is $1\n";
}
| [reply] [d/l] |