in reply to wrapping a pair of lines; what if different lengths?
It's not clear what your join/map combination was doing.my $line_length = 60; my @strings = ($genome1, $mismatches, $genome2); # Determine the longest string of the group my $length = (reverse sort { $a <=> $b } map { length } @strings)[0]; # Then iterate through for (my $x = 0; $x < $length; $x += $line_length) { print substr ($strings[$_], $x, $line_length),$/ for (0..2); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Wrapping Strings
by Anonymous Monk on Jan 17, 2003 at 11:22 UTC | |
by aging acolyte (Pilgrim) on Jan 17, 2003 at 11:53 UTC | |
by tadman (Prior) on Jan 17, 2003 at 13:44 UTC |