[Melbourne-pm] Postfix conditionals and creating lexicals
Alfie John
alfiej at opera.com
Wed Jul 11 16:00:20 PDT 2012
Hi guys,
Thanks to Rob Norris for reminding me to bring up my rant on Google+
What do people think about the following?
-- 8< --
#!/usr/bin/perl
use strict;
use warnings;
sub foo {
my ( $bar ) =@_;
my $baz = $bar if $bar;
print "baz = $baz\n";
$baz = 42;
}
foo( 1 );
foo( 1 );
foo( 0 );
foo( 0 );
-- >8 --
Alfie
--
Alfie John
alfiej at opera.com
More information about the Melbourne-pm
mailing list