Skip navigation.
Home
Your source for Perl tips, howto's, faq and tutorials
( categories: )

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?