RE: Array Reference Practice Help

2003-10-26 Thread Charles K. Clarkson
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) = @

Re: Array Reference Practice Help

2003-10-26 Thread Jakob Lell
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

Re: Array Reference Practice Help

2003-10-26 Thread Tore Aursand
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

Array Reference Practice Help

2003-10-26 Thread perl
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