Lonely Lion

Chris McAvoy likes kites

More Perl6

without comments

For this season’s last TechCoffee, I spent some more time toying with Perl6. I won’t be able to check the code in until tonight, but thought I’d summarize. There were more side conversations today than in the past, which was fun, but hit me in the productivity department.

I downshifted a bit, kicked in the turbo boosters, and quit namby pambing around with the little crap. I went straight for the junk and read up on subroutine argument passing, something that’s been lacking in Perl since 199*.

So long sub this { my $arg = shift; }, hello sub this ($arg1, $arg2, $arg3) {}.

In addition to purely positional arguments, you can also pass named arguments sub named (:$cats, :$dogs) {}, or lists sub lister(*@listofargs) {} and hashes sub hasher(*%hashofargs) {}

Written by Chris

August 28th, 2006 at 3:38 pm

Posted in Perl6,TechCoffee

Leave a Reply