in reply to Push and list context

Putting arrays in quotes seems to be the same as joining them. That is, it adds spaces betweeen the elements. This works, and is real easy to read.
use warnings; use strict; my @array = qw/one two three/; my @reversed = reverse @array; print "@array @reversed", "\n";

Replies are listed 'Best First'.
Re^2: Push and list context
by Mugatu (Monk) on Mar 15, 2005 at 16:53 UTC
    Putting arrays in quotes seems to be the same as joining them. That is, it adds spaces betweeen the elements.

    Array interpolation uses $" as the separator, which defaults to a space, but can be changed to anything. Thus, "@array" is equivalent to join($", @array) (which I had in my earlier reply, but didn't really explain all the way).