$new .= "\n" while s/.$/ $new .= $&; '' /gem;
Did you test this?
$ time perl -e' use Data::Dumper; $Data::Dumper::Useqq = 1; my $x = "123456789\n"; print Dumper $x; my $new = ""; $new .= "\n" while $x =~ s/.$/ $new .= $&; '' /gem; print Dumper $new; ' $VAR1 = "123456789\n"; Out of memory! real 1m54.230s user 0m3.216s sys 0m9.332s
BTW, my system has 32GB of RAM ouch!
Sorry, my mistake was leaving in the single quotes, oops.
In reply to Re^3: Uninitialized warnings trouble
by jwkrahn
in thread Uninitialized warnings trouble
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |