| Next | Tricks of the Wizards | 92 |
The Perl 6 variable syntax is a little different
Beginners always want element 3 of @array to be @array[3]
In Perl 6, it is.
Perl 5 Perl 6
---------------------------
$s $s
$a[$n] @a[$n]
$h{$k} %h{$k}
$s->[$n] $s[$n]
$s->{$k} $s{$k}
$s->(@a) $s(@a)
We'll build a filter that translates Perl 6 syntax to Perl 5's
| Next | ![]() |
Copyright © 2003 M. J. Dominus |