my @hosts; if ( -e "ship.cfg" ) { open (CFGFILE, "ship.cfg") || die; @hosts=; close (CFGFILE); } else { # Enter your hosts here... @hosts = qw/host1 host2 host3/; }