in reply to Re: Need a better way to count input lines
in thread Need a better way to count input lines
to$fname =~ s/^\s+(.+?)\W*$/$1/;
and the problem went away. (Of course it did. I should have seen that.) I can see why with the '+' it didn't work right, but why would the failure manifest as a CR at the end of $fname?$fname =~ s/^\s*(.+?)\W*$/$1/;
The paren/quote format worked fine with just a comma but broke with the addition of the space char class. Did I just get lucky the first way?Unrecognized escape \s passed through at phonelist.pl line 28.
As to the LIMIT option, my Llama book doesn't explain it. Does the 2 relate the expectation of having two char within the match?
-Theo-
(so many nodes and so little time ... )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Need a better way to count input lines
by hv (Prior) on May 07, 2004 at 20:09 UTC |