On Saturday, June 23rd, Damian Conway had a little free for all free-for-all workshop that he gave at College of DuPage in Wheaton, IL. He talked about a ton of different Perl topics, all of them enlightening. He's a great speaker, and I wish I could have gone to the 3-day class that he gave earlier in the week. Here are some random notes of interestingness that I scribbled down. Perhaps frag will want to add some of his own comments.
sub mangle {
...
return 1;
}
Yes, that's a literal .... Executing mangle() would have Perl kick out a message like ``sub mangle is pending future code''.
foreach ( @foo ) {
whack($_);
}
the foreach is a control structure.
In this code:
whack($_) foreach @foo;
the foreach is a ``qualifier'', which is why you can't apply it to a block in that syntax.
if ( $x > 50 ) {
do_something();
}
is the same as
($x > 50) && do_something();
It's all just a lot of booleans in there.
while ($foo) {
for ( @list ) {
print << "END";
Here's the text of the message I want to print.
Note that I'm not flush left like I would have
to be in Perl 5. The amount of whitespace before
the terminating "END" is stripped from the front
of each line.
END
} # for
} # while
Many of us literally applauded and cheered.
xoxo,
Andy
--
I was dreaming when I wrote this, so sue me if I go too fast.
In reply to My day with Damian Conway by petdance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |