http://qs321.pair.com?node_id=603883


in reply to spliting text!!

use strict; use warnings; my $line = <DATA>; # Quick and dirty # Greedily match anything from 1-70 characters my @lines = $line =~ /.{1,70}/g; print $_,"\n" for @lines; # Less memory use for large blocks of text while ($line =~ /(.{1,70})/g) { print $1,"\n"; } __DATA__ 1234567890123456789012345678901234567890123456789012345678901234567890 +123456789012345678901234567890123456789012345678901234567890123456789 +012345678901234567890123456789012345678901234567890123456789012345678 +901234567890123456789012345678901234567890123456789012345678901234567 +890123456789012345678901