in reply to Re: matching large arrays then updating
in thread matching large arrays then updating

-ikegami I've followed your logic but I'm having the following issue:
my %array2 = map { $_->[0] => $_ } @array2;
produces the following problem:
The %array2 contains a single line: key="" and %array{$key} returns one record from array2

The initial array from the file contains 200k records but they are not being added to the hash...
I've tried many ways to map the array but I've been unsuccessful so far...
Thanks again for you help.

Replies are listed 'Best First'.
Re^3: matching large arrays then updating
by ikegami (Patriarch) on Oct 24, 2011 at 22:36 UTC

    The initial array from the file contains 200k records but they are not being added to the hash...

    Then your data isn't arranged as you said it is.

    The %array2 contains a single line: key=""

    Hashes have elements, not lines.

    and %array{$key} returns one record from array2

    %array{$key} is a syntax error, there is no variable named "%array" in this discussion, and "array2" could refer to the array @array2 or the hash %array2.

    The initial array from the file contains 200k records but they are not being added to the hash...

    My code doesn't even try to add the 200k records of @array1 to the hash. It adds the 50k records of @array2.