in reply to How To Read Hosts File Into a Hash
while (<FILE>) { next if /^\s*#/ ; # skip comments chomp; my ($key, $value) = split (/\s+/, $_); $hosts{$key} = $value; # here was your mistake }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How To Read Hosts File Into a Hash
by keszler (Priest) on Sep 16, 2011 at 00:05 UTC | |
|
Re^2: How To Read Hosts File Into a Hash
by at2marty (Novice) on Sep 16, 2011 at 00:12 UTC | |
by toolic (Bishop) on Sep 16, 2011 at 01:17 UTC | |
by keszler (Priest) on Sep 16, 2011 at 01:30 UTC |