in reply to newbie hasher

Here's another way:

use strict; use warnings; my %hash = map { chomp; split /\s+/, $_, 2 } <DATA>; print "$_, $hash{$_}\n" foreach keys %hash; __DATA__ host1 1.1.1.1 host2 1.2.3.5

Fun huh? ;)


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein