Ken Peng
2014-08-18 08:17:53 UTC
Hello,
sub myfunc {
my @x=(1,2,3);
return \@x;
}
# or,
sub myfunc {
my @x=(1,2,3);
return [@x];
}
which one is the better way to return the list content? And if the
method is an instance method?
Thanks.
sub myfunc {
my @x=(1,2,3);
return \@x;
}
# or,
sub myfunc {
my @x=(1,2,3);
return [@x];
}
which one is the better way to return the list content? And if the
method is an instance method?
Thanks.
--
To unsubscribe, e-mail: beginners-***@perl.org
For additional commands, e-mail: beginners-***@perl.org
http://learn.perl.org/
To unsubscribe, e-mail: beginners-***@perl.org
For additional commands, e-mail: beginners-***@perl.org
http://learn.perl.org/