in reply to newbie hasher
Since nobody else has used map() yet:
open my $hosts, '<', 'hosts.txt' or die "open failed: $!"; my %hosts = map { chomp; split /\s+/ } <$hosts>; close $hosts or die "close failed: $!";
Update: Dope! Two people got maps in before me (somehow) lol
|
|---|