Howto create a Hash array from a file format like this :- SNPSTER2_50_3_1_119_588 10 SNPSTER2_50_3_1_121_522 16 SNPSTER2_50_3_1_119_260 27 My code #!/usr/bin/perl -w %href; $fn=<>; open(FH,"$fn") || die("Cannot open:$!"); while(<FH>) { @_=split('\t',$_); $key = @_[0]; $href{$key} = @_[1]; while (($key, $value) = each(%href)) { print $key.", ".$value."\n"; } } I am not getting values
In reply to Creating hash Array by ashnator
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |