my @a = (1,2,3,4,5);
print @a; #output: 12345
print "
";
print "@a"; #output: 1 2 3 4 5
Printing an array by putting its name withing double quotes puts a space between each index's value at output. How does it do it? Why doesn't print @a;
prints the same? What's the need of both types? I mean when will you use print @a;
instead of print "@a";
and vice versa.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…