Skip to content

Commit

Permalink
Normalizes output, closes #2091
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Jun 5, 2018
1 parent 8e38ef4 commit 5f7646f
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions doc/Language/5to6-nutshell.pod6
Expand Up @@ -1626,21 +1626,20 @@ Pair, with a key of the var name, and a value of the var value.
[ qw( foo bar *baz ) ],
);
# Output
$foo = 42;
$bar = 44;
@baz = (
16,
32,
64,
'Hike!'
);
# $foo = 42;
# $bar = 44;
# @baz = (
# 16,
# 32,
# 64,
# 'Hike!'
# );
=end code
=begin code :preamble<no strict;>
# Perl 6
say [ :$foo, :$bar, :@baz ].perl;
# Output
["foo" => 42, "bar" => 44, "baz" => [16, 32, 64, "Hike!"]]
say [ :$foo, :$bar, :@baz ].perl;
# OUTPUT: «["foo" => 42, "bar" => 44, "baz" => [16, 32, 64, "Hike!"]]␤»
=end code
There is also a debugging aid for developers called C<dd> (Tiny Data Dumper,
Expand All @@ -1650,11 +1649,8 @@ STDERR:
=begin code :preamble<no strict;> :ok-test<dd>
# Perl 6
dd $foo, $bar, @baz;
# Output
# Int $foo = 42
# Int $bar = 44
# Array @baz = [16, 32, 64, "Hike!"]
dd $foo, $bar, @baz;
# OUTPUT: «Int $foo = 42␤Int $bar = 44␤Array @baz = [16, 32, 64, "Hike!"]␤»
=end code
=head3 C<Getopt::Long>
Expand Down

0 comments on commit 5f7646f

Please sign in to comment.