in reply to Re: substr question
in thread substr question
Probably better as:
my $s2; for ( split /(\s+)/, $s ) { last if length( $s2 . $_ ) > 100; $s2 .= $_; } print $s2;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: substr question
by toolic (Bishop) on Jun 18, 2010 at 18:55 UTC |
In Section
Seekers of Perl Wisdom