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 reference
print "b[0]:" . $$b[0] . "\n";
}

Please let me know if there is anything wrong with this practice.

-thanks


-----------------------------------------
eMail solutions by 
http://www.swanmail.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to