in reply to Re: Strange behaviour with Arrays and print?
in thread Strange behaviour with Arrays and print?

But in the spirit of your example code, the compiler might proceed something like:
Source   "@a\n"
Becomes  "@a" . "\n"
Becomes  join($", @a) . "\n"
Becomes  "10 20 30" . "\n"
Becomes  "10 20 30\n"
with  join($", @a) (or its runtime equivalent) still providing list context to the array.

Replies are listed 'Best First'.
Re^3: Strange behaviour with Arrays and print?
by Anonymous Monk on Jul 12, 2014 at 14:31 UTC
    You're right, of course. Also, it appears that Perl has different overloads for for string concatenation and stringification. Interesting... I never knew that.