|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: Count number of lines in a STRINGby nagalenoj (Friar) |
| on May 12, 2010 at 10:17 UTC ( #839592=note: print w/ replies, xml ) | Need Help?? |
|
TIMTOWTDI Here's is the another way.Treating the scalar as a file handle.
This is not efficient than using tr. But, you can process a string as file by this way.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||