in reply to Different hashes part II
in thread Different hashes?

I am trying borisz's solutions, but as well as the others it's taking too much time to execute, so I cancelled it.. but this time the PARTIAL output I am getting is OK, I am not sure it is repeating the whole thing over and over..
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
    It is OK, I should not print the dumper(\%product) to the output file, inside the loop mmmmmm sorry about that