in reply to Breaking up a really long string
I can only add that it's a bad idea to use $&, because it will slow down regex matches in your whole script, and even in modules included from your script.
Use $var =~ s/(\S{$last_length})/$1\n/sg; instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Breaking up a really long string
by almut (Canon) on Jun 23, 2008 at 21:57 UTC | |
|
Re^2: Breaking up a really long string
by mhearse (Chaplain) on Jun 23, 2008 at 21:52 UTC |