while (<FILE>) { next if /^\s*#/ ; # skip comments chomp; my ($key, $value) = split (/\s+/, $_); $hosts{$key} = $value; # here was your mistake }
In reply to Re: How To Read Hosts File Into a Hash
by onelesd
in thread How To Read Hosts File Into a Hash
by at2marty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |