in reply to Space prepended to Array Print

Other comments above give you the explanation on what happened.

Me, when I want to put the lines of a text file in an array, I usually write:

my @data = map { chomp; $_ } <>;

And when I want to output it, I write:

print "$_\n" for @data

In Perl6 I'd write:

my @data = lines; .say for @data;

Replies are listed 'Best First'.
Re^2: Space prepended to Array Print
by choroba (Cardinal) on Jun 08, 2013 at 07:57 UTC
    A bit faster is to use chomp for the array:
    chomp(my @data = <>);
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ