Hi ashnator
'@_' is the special variable used for subroutine arguments, instead you should use the array variable like
use strict; my %href; my $fn=<>; open(FH,"$fn") || die("Cannot open:$!"); while(<FH>) { my @array =split('\t',$_); ###@array is the array variable my $key = $array[0]; $href{$key} = $array[1]; } while (my ($key, $value) = each(%href)) { print $key.", ".$value."\n"; }
Punitha
In reply to Re: Creating hash Array
by Punitha
in thread Creating hash Array
by ashnator
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |