Submitted by vinoth on Sat, 05/02/2009 - 13:01.
( categories: perl questions )
our @foo = ("ree1", "ree2", "ree3");
print_array(*foo);
my @foo = ("ree3","ree2","ree1");
print_array(\@foo);
sub print_array {
local (*printarr) = @_;
foreach my $val (@printarr) {
print "$val\n";
}
}
Here which one is the efficient way of passing array to a function print_array?
