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