use strict; use warnings; my %href; my $fn = <>; open(FH, "$fn") || die "Cannot open file"; while (<FH>) { chomp($_); $href{$1} = $2 if $_ =~ /(\S+)\s+(\S+)/; } while (my ($key, $value) = each(%href)) { print $key. ", ". $value."\n"; }
In reply to Re: Creating hash Array
by brsaravan
in thread Creating hash Array
by ashnator
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |