my @a = (10, 20, 30);
foo(\@a);
sub foo
{
my $pa = shift;
my @a = @$pa;
for(my $i = 0; $i < @a; $i = $i + 1)
{
print "$a[$i]\n";
}
}
my @a = (10, 20, 30);
foo(\@a);
sub foo
{
my $pa = shift;
my @a = @$pa;
for(my $i = 0; $i < @a; $i = $i + 1)
{
print "$a[$i]\n";
}
}
No comments:
Post a Comment