in reply to Re^2: improving the aesthetics of perl code
in thread improving the aesthetics of perl code
foreach $_(@TMP) { if ($_ =~ /^([\w.]+)$/) { $_ = $1; push (@hosts, $1); } else { next; } }
I may be missing something blindingly obvious, though. :-)foreach (@tmp) { push @hosts, $1 if /^([\w.]+)$/; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: improving the aesthetics of perl code
by Tanktalus (Canon) on Jan 21, 2005 at 16:29 UTC | |
Re^4: improving the aesthetics of perl code
by jdporter (Paladin) on Jan 21, 2005 at 22:25 UTC | |
by sleepingsquirrel (Chaplain) on Jan 21, 2005 at 22:43 UTC |