my %info; while (<>) { my ($key, $value) = /([^|]*\|[^|]*)\|(.*)/; push @{$info{$key}}, $value; } while (my ($key, $value) = each %info) { local $" = ","; print "$key|@$value\n"; } __END__
In reply to Re: amalgamate similar lines
by Perl Mouse
in thread amalgamate similar lines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |