I expect the following 2 prints are the same.
@a=(a..z);
print "@a\n";
print @a;
But actually, it gives me this:
a b c d e f g h i j k l m n o p q r s t u v w x y z
abcdefghijklmnopqrstuvwxyz
Why the extra spaces?
I am using ActivePerl for Windows.
Update
With the following 2 answers, I came up with this:
use English;
$LIST_SEPARATOR="*";
@a=(a..z);
print "@a\n";
And it gave me this:
a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z
Because the default value for
$"is a space and the default value for$,is an empty string.You can read about all of Perl’s special variables in perlvar.