Jakob Lell <[EMAIL PROTECTED]> wrote:
:
: you can use prototypes to pass array references.
: see perldoc perlsub for more details.
:
: sub showIt([EMAIL PROTECTED]@);
: my @alpha=("a","b","c");
: my @numer=(1,2,3);
: showIt(@alpha,@numer);
: sub showIt([EMAIL PROTECTED]@)
: {
: my($a,$b) = @
On Sunday 26 October 2003 10:35, [EMAIL PROTECTED] wrote:
> Is this a standard/normal/ok way to pass and use array by reference?
>
> @alpha=("a","b","c");
> @numer=(1,2,3);
>
> #calling by reference
> showIt([EMAIL PROTECTED], [EMAIL PROTECTED]);
>
> sub showIt
> { my $a = $_[0]; #assinging by ref
On Sun, 26 Oct 2003 01:35:47 -0800, perl wrote:
> Is this a standard/normal/ok way to pass and use array by reference?
Almost, I would say.
> #calling by reference
> showIt([EMAIL PROTECTED], [EMAIL PROTECTED]);
>
> sub showIt
> { my $a = $_[0]; #assinging by reference
> my $b = $_[1];
>
> p
Is this a standard/normal/ok way to pass and use array by reference?
@alpha=("a","b","c");
@numer=(1,2,3);
#calling by reference
showIt([EMAIL PROTECTED], [EMAIL PROTECTED]);
sub showIt
{ my $a = $_[0]; #assinging by reference
my $b = $_[1];
print "a[0]:" . $$a[0] . "\n"; #accessing by refer