canspice.org

home about code feeds archives links

OSCON 2008: The Twilight Perl, by Damian Conway

I missed the beginning of this, so here’s just some notes and braindumps.

for $wq qw wq qw {
  print $wq;
}

…prints:

q
q

You can do things like @list = <Damian Matthew Lucifer Conway> and have it just work.

sub RESPECT { print "@_\n" }
(R.E.S.P.E.C.T)->('find out what it means to me');

Oh god.

sub *{'='} = sub { print "@_\n" };

or

*= = sub { print "@_\n" }

Damian is an evil evil man. You can change the name of anonymous subroutines:

my $anon1 = sub {
  local *__ANON__ = "Bruce";
  carp "We'll just call you Bruce, okay?";
};

That’s the only bit of useful stuff in this talk. Here comes some more useless scary stuff: while ( $count –> 0 ) {. $hash<-{$key} is a substitute for an empty string.

You can slurp a whole file in a single line: my $content = readline!open!((*{$!},$/)=\$file); — I think that’s right.

And that’s a wrap!

Tags: , , ,

One Response to “OSCON 2008: The Twilight Perl, by Damian Conway”

[...] think Brad may have taken notes. Which is good, because now I wish I [...]

 

Leave a Reply

Name (required)
Mail (required)
Website
Comments