Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Using qwby GrandFather (Saint) |
on Nov 18, 2005 at 01:52 UTC ( [id://509666]=note: print w/replies, xml ) | Need Help?? |
In both cases you have an array and print does not insert any extra characters between the elements of an array. You can use join to do that however:
Prints:
To see why I put the brackets in try these two lines:
Note the space before the x in the second line because @days, "x\n" is a list that join acts on, rather than the paraneter for join followed by a parameter for print. DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom
|
|