On Thu, 29 May 2014 13:36:11 -0700
Jim Gibson <jimsgib...@gmail.com> wrote:

> Try it yourself:
> 
> % perl -e '@t=qw(1 2 3);$t=@t;print qq($t\n);'
> 3
> % perl -e '@t=qw(1 2 3);($t)=@t;print qq($t\n);'
> 1
> % perl -e '@t=qw(1 2 3);($t)=(@t);print qq($t\n);'
> 1

This would be clearer if you used letters:

$ perl -E'@t=qw( a b c );$t=@t;say$t'
3
$ perl -E'@t=qw( a b c );($t)=@t;say$t'
a
$ perl -E'@t=qw( a b c );($t)=(@t);say$t'
a


-- 
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