Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Re: Need a better way to count input linesby Theo (Priest) |
on May 07, 2004 at 17:38 UTC ( [id://351548]=note: print w/replies, xml ) | Need Help?? |
Ahh! The lights come on! (Then they go dim again) I changed the
to 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? But I am perplexed about the split itself. I replaced the (",") with (",\s*") and got the error: 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? 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-
In Section
Seekers of Perl Wisdom
|
|