Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my ($x, $y); if (fn(\$x, \$y)) { die "fn() failed\n"; } # do stuff with $x and $y... exit 0; sub fn { my ($fn_x, $fn_y) = @_; ($fn_x, $fn_y) = ('x', 'y'); my $rc = 0; $rc = 1 if $fn_x ne 'x'; # never happens, just an example return 0; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parameter passing
by gjb (Vicar) on Oct 30, 2003 at 15:23 UTC | |
|
Re: Parameter passing
by monktim (Friar) on Oct 30, 2003 at 15:21 UTC | |
|
Re: Parameter passing
by TomDLux (Vicar) on Oct 30, 2003 at 15:44 UTC | |
|
Re: Parameter passing
by meetraz (Hermit) on Oct 30, 2003 at 20:43 UTC | |
|
Re: Parameter passing
by hmerrill (Friar) on Oct 30, 2003 at 15:54 UTC | |
by gjb (Vicar) on Oct 30, 2003 at 16:11 UTC |