Skip to content
Browse files

Correct output of printing array.

  • Loading branch information...
1 parent 0871dff commit a4ce72c30791185bbf47125d792ad6a61cd911d1 @pmichaud pmichaud committed Jun 30, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 answers.md
View
4 answers.md
@@ -55,11 +55,11 @@ references doesn't make much sense. Unlike Perl 5, scalar variables
can also contain arrays directly:
my @a = 1, 2, 3;
- say @a; # 1, 2, 3
+ say @a; # "1 2 3\n"
say @a.WHAT; # Array()
my $scalar = @a;
- say $scalar; # 1, 2, 3
+ say $scalar; # "1 2 3\n"
say $scalar.WHAT; # Array()
The big difference is that arrays inside a scalar variable do not flatten in

0 comments on commit a4ce72c

Please sign in to comment.
Something went wrong with that request. Please try again.