On Mon, 18 Aug 2014 16:17:53 +0800
Ken Peng <o...@dnsbed.com> wrote:

> sub myfunc {
>   my @x=(1,2,3);
>   return \@x;
> }
> 
> # or,
> 
> sub myfunc {
>   my @x=(1,2,3);
>   return [@x];
> }

# or

sub myfunc {
  return [ 1, 2, 3 ];
}


-- 
Don't stop where the ink does.
        Shawn

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to