in reply to Is this normal
You're making two mistakes:
- You're calling the match in list context, so an empty list is returned, reducing the number of passed parameters.
- Even when called in scalar context, a non-match does not return 0. It returns the empty string (most Perl build-ins that return either a true or a false value, return 1 or "")
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Is this normal
by dave_the_m (Monsignor) on Jan 06, 2012 at 23:30 UTC | |
by JavaFan (Canon) on Jan 07, 2012 at 08:45 UTC |
In Section
Seekers of Perl Wisdom