natty_dread has asked for the wisdom of the Perl Monks concerning the following question:
My problem line of code is passing the global var $svr into the sub. I've tried my $ls_eng = shift (@_) AND my $ls_eng = $_; also.........I'm sure it's something small.open (SERVERLST, "< svr_daily.csv"); foreach my $svr (<SERVERLST>) { chomp $svr; &ls_engine; } sub ls_engine { my $ls_eng = $_[0]; system ("wdmlseng -e $ls_eng"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: subroutines and arguments
by phaylon (Curate) on Apr 04, 2005 at 13:28 UTC | |
|
Re: subroutines and arguments
by Fletch (Bishop) on Apr 04, 2005 at 14:10 UTC | |
by jhourcle (Prior) on Apr 05, 2005 at 01:19 UTC | |
by Fletch (Bishop) on Apr 05, 2005 at 03:07 UTC | |
|
Re: subroutines and arguments
by deibyz (Hermit) on Apr 04, 2005 at 13:28 UTC | |
|
Re: subroutines and arguments
by maa (Pilgrim) on Apr 04, 2005 at 13:29 UTC |