>> 2) perl -le '$x = qw/a b c d e/; print $x'
>> e
>
>> Or better what is (2) doing?
>
> Read up on the comma operator in perlop (and I know there are no literal
> commas in (2) but qw/a b c d e/ behaves exactly the same as ('a', 'b', 'c',
> 'd', 'e').)
>
> perldoc perlop
Why would this be considered a binary (?) use? I read the documentation,
but I think I'm missing something, it doesn't make sense.
This is really bizarre and unexpected for me (I'm not the OP, by the way).
Can someone help train my intuition as to why these aren't identical? And
why they shouldn't be?
% perl -le '$x = @{[ "a","b","c","d","e" ]}; print $x'
5
% perl -le '$x = ("a","b","c","d","e"); print $x'
e
- B
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>