in reply to Re^3: Looping in hash table and get each row value
in thread Looping in hash table and get each row value
My code goes like that and I checked it it's working since I got to store the values of the file in a hash table. My next target is to loop within my hash and get each row value and will use that value in listing a file.my %hash; open (INPUT, "file") or die "Can't open file: $!"; my $records = <INPUT>; chomp($records); while (<INPUT>){ my @arr = split (/\ /, $_); my ($key, $value) = ($arr[1], $[0]); $srcid_hash{$key} = $value; print "$key\t$value\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Looping in hash table and get each row value
by hdb (Monsignor) on Jun 06, 2013 at 09:15 UTC |