Probably the easiest way is to split each line and explicitly add the pair to the hash,
my %hosts; { local $_; open my $fh, '<', '/path/to/data.file' or die $!; while (<$fh>) { my @pair = split; $hosts{ $pair[0] } = $pair[1]; } close $fh or die $!; }
After Compline,
Zaxo
In reply to Re: newbie hasher
by Zaxo
in thread newbie hasher
by prodevel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |