in reply to Why do spaces keep getting added after I print the elements of an array?

Because printing an array or array slice or hash slice inside double quotes is the same as join $", (...); and $" is " ". Perhaps you'll want to do: local $";.

japhy -- Perl and Regex Hacker
  • Comment on Re: Why do spaces keep getting added after I print the elements of an array?

Replies are listed 'Best First'.
Re: Re: Why do spaces keep getting added after I print the elements of an array?
by tye (Sage) on Jun 28, 2001 at 00:58 UTC

    Or just drop the quotes since print can take a list of values.

            - tye (but my friends call me "Tye")