danj35 has asked for the wisdom of the Perl Monks concerning the following question:
Hey monks,
Asked an question earlier about counting the number of lines in a string (not a file)(http://www.perlmonks.org/?node_id=839575). The code works fine for this:
my $count = ($string =~ tr/\n//);
Now I need to split the $string at line 20. Anyone know how to do this?
Cheers
|
|---|