in reply to Dividing up Long Lines
It depends if your address 2 can be 60 or longer, or if it is 30 or more but has no spaces. Otherwise, these may help:use warnings; use strict; use Data::Dumper; use Text::Wrap; $Text::Wrap::columns = 30; my $col = 'very long string right here ya know'; my @cols = split /\n/, wrap('', '', $col); print Dumper(\@cols); __END__ $VAR1 = [ 'very long string right here', 'ya know' ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dividing up Long Lines
by Anonymous Monk on Jun 23, 2012 at 09:39 UTC |