in reply to Sub Return Help
use warnings; use strict; sub get_host { open( HOST, "<hosts.txt" ); while (<HOST>) { my ($line) = $_; chomp($line); print "hostname = $line\n"; } } get_host(); __END__ hostname = hostone hostname = hosttwo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sub Return Help
by PerlCramps (Novice) on May 07, 2015 at 11:12 UTC | |
|
Re^2: Sub Return Help
by PerlCramps (Novice) on May 07, 2015 at 15:18 UTC | |
by toolic (Bishop) on May 07, 2015 at 15:26 UTC |