in reply to passing argv by reference
References in perl are a bit different from C or other languages.
What you have passed is like a scalar with the reference to an array; so the ways to retrieve it are:
sub spawn_proc_prog { my ($r, $command, $argv) = @_; # to access the elements of $argv you do my $first = $argv->[0]; my $second = $argv->[1]; # or my @argv = @{$argv}; # and there's a lot more..
Update: try perldoc perlref for more information about references in perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: passing argv by reference
by Anonymous Monk on Jun 09, 2003 at 18:01 UTC | |
by bobn (Chaplain) on Jun 09, 2003 at 21:21 UTC | |
by Anonymous Monk on Jun 09, 2003 at 21:13 UTC |