in reply to rearranging text
use strict; my $prev; while (<DATA>) { next if /^\s*$/; chomp (my ($curr, $val) = split /,\s+/); print $prev ? "\n" : "", $prev = $curr if $curr ne $prev; print ", $val"; } print "\n"; __DATA__ a, 1 aa, 3 aa, 5 aa, 8 b, 2 b, 3 bb, 5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: rearranging text
by kiat (Vicar) on Dec 02, 2003 at 08:34 UTC | |
by Roger (Parson) on Dec 02, 2003 at 10:57 UTC |