in reply to Different hashes part II
in thread Different hashes?
Borisz's script: #!/usr/bin/perl use Data::Dumper; my %products; while (defined( $_ = <DATA> )){ next if $. <= 2 || /^\s*$/; my @d = split ' '; my $cat = shift @d; my $id = shift @d; push @{$products{$cat}}, [ $id, \@d ]; } print Dumper(\%products);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Different hashes part II
by Anonymous Monk on Mar 26, 2004 at 17:15 UTC |