open my $fh, "<input.dat" or die "Couldn't open file: $!"; my %hosts; while (<$fh>) { chomp; my ($host, $ip) = split; $hosts{$host} = $ip; } use Data::Dumper; print Dumper \%hosts;
In reply to Re: newbie hasher
by Anonymous Monk
in thread newbie hasher
by prodevel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |