in reply to Help on file comparison
I think you want: push @{$hashList{id}}, $accno;my ($id, $accno) = split /\|/, $_; push @{$hashList{$guid}}, $accno;
As it is, all records in the first input are being pushed onto a single array. Then, in the second while loop, it may be you are running into that one string that matches the one hash key that contains the one big array. And this statement:
tries to make a copy of the array. Boom. (I can't be sure this is what's happening based on the small amount of info you gave, but it looks plausible.)for my $accno (@{$hashList{$_}})
UPDATE: Actually, I'm not sure that the for-loop expression there is copying the array -- seems like it shouldn't have to. Still, you need to fix how the hash gets loaded.
|
|---|