http://qs1969.pair.com?node_id=424157


in reply to Re^4: improving the aesthetics of perl code
in thread improving the aesthetics of perl code

Why not...
@hosts = map { /^([\w.]+)$/ ? $1 : () } @tmp;
update: might as well get rid of the @tmp while we're at it...
@hosts = map { /^([\w.]+)$/ ? $1 : () } <CFGFILE>;


-- All code is 100% tested and functional unless otherwise noted.