danj35 has asked for the wisdom of the Perl Monks concerning the following question:
Good day Monks,
Quick question here, nice and easy. I know how easy it is to count the number of lines in a file, though I am looking to count the number of lines in a string. The string I have can range from having no lines to a theoretically infinite amount. I simply need to count the number of lines in it and return it as a variable (integer). Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Count number of lines in a STRING
by JavaFan (Canon) on May 12, 2010 at 09:36 UTC | |
by LanX (Saint) on May 12, 2010 at 09:57 UTC | |
by JavaFan (Canon) on May 12, 2010 at 10:10 UTC | |
by LanX (Saint) on May 12, 2010 at 10:48 UTC | |
by danj35 (Sexton) on May 12, 2010 at 09:45 UTC | |
|
Re: Count number of lines in a STRING
by moritz (Cardinal) on May 12, 2010 at 09:34 UTC | |
|
Re: Count number of lines in a STRING
by nagalenoj (Friar) on May 12, 2010 at 10:17 UTC | |
|
Re: Count number of lines in a STRING
by jospan (Novice) on Nov 10, 2010 at 20:57 UTC | |
by jospan (Novice) on Nov 13, 2010 at 09:33 UTC |