diff options
Diffstat (limited to 'perl6.html.markdown')
-rw-r--r-- | perl6.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl6.html.markdown b/perl6.html.markdown index 7afcc930..52625bc2 100644 --- a/perl6.html.markdown +++ b/perl6.html.markdown @@ -64,7 +64,7 @@ say "Interpolate an array using [] : @array[]"; my @keys = 0, 2; @array[@keys] = @letters; # Assign using an array -say @array; #=> a 2 b +say @array; #=> a 6 b # There are two more kinds of lists: Parcel and Arrays. # Parcels are immutable lists (you can't modify a list that's not assigned). @@ -1447,7 +1447,7 @@ so 'ayc' ~~ / a [ b | y ] c /; # `True`. Obviously enough ... # It's very powerful, because Perl 6 actually parses the argument # and pass them as such to the sub. It also handles named argument (`--foo`) # and will even go as far as to autogenerate a `--help` -sub MAIN($name) { say "Hello, you !" } +sub MAIN($name) { say "Hello, $name !" } # This produces: # $ perl6 cli.pl # Usage: |