|
Posted by brian d foy on March 18, 2008, 5:15 pm
Please log in for more thread options
> On Sun, 16 Mar 2008 06:03:03 -0700, PerlFAQ Server wrote:
>
> > 5.39: Why do I get weird spaces when I print an array of lines?
> >
> > Saying
> >
> > print "@lines\n";
> >
> > joins together the elements of @lines with a space between them.
>
> I recently learnt from a post here by Ben Morrow that it joins together
> the elements of @lines with a $" between them:
>
> ben ~ 502 $ perl -e '$"="bu";@ba=("bo","be");print "@ba\n";'
> bobube
>
> Shouldn't this FAQ entry mention $"?
The FAQ shouldn't mention $". The answer is not about how to change
what happens, but to recognize in the default case that interpolating
an array has behavior.
But, the answer could be better.
|