in reply to newbie hasher
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: newbie hasher
by ysth (Canon) on Nov 20, 2003 at 06:08 UTC |