while () { next if /^\s*#/; my @f = split(' ', $_); if ($f[2] eq "nfs") { $hash{$f[0]} = $f[1]; } }