in reply to Re^3: Retrieving Key and Value Hashes
in thread Retrieving Key and Value Hashes
i tried to simply insert my files instead. on the command line it didnt print anything. no syntax errors. been working through possible edits.
open(FILE1, $ARGV[0]) or die "Cannot open the file: $!"; my %hash1 = split ' ', do{ local $/; <FILE1> }; close FILE1; open(FILE2, $ARGV[1]) or die "Cannot open the file: $!"; while(<FILE2>) { my ($key) = split; exists $hash1{$key} and print "$key $hash1{$key}\n"; } close FILE2;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Retrieving Key and Value Hashes
by Laurent_R (Canon) on Jul 05, 2015 at 09:01 UTC | |
|
Re^5: Retrieving Key and Value Hashes
by AnomalousMonk (Archbishop) on Jul 05, 2015 at 17:37 UTC | |
|
Re^5: Retrieving Key and Value Hashes
by Anonymous Monk on Jul 05, 2015 at 03:42 UTC | |
by gghelpneeded (Novice) on Jul 05, 2015 at 04:46 UTC |