in reply to Re: Looping in hash table and get each row value
in thread Looping in hash table and get each row value

hi thank you for this but what I mean is I want to get EACH row value in the hash table not just store all its value in an array..
  • Comment on Re^2: Looping in hash table and get each row value

Replies are listed 'Best First'.
Re^3: Looping in hash table and get each row value
by hdb (Monsignor) on Jun 06, 2013 at 07:43 UTC

    Can you specify what you mean by "row value in the hash table" ? Some example?

      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"; }
      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.

        See each and the examples therein.