[Melbourne-pm] Postfix conditionals and creating lexicals

Brendon Oliver brendon.oliver at gmail.com
Wed Jul 11 20:34:31 PDT 2012


On Thu, Jul 12, 2012 at 8:00 AM, Alfie John <alfiej at opera.com> wrote:
> 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 --
>

FWIW, I asked about this several years ago & we had a discussion about
it on this list.

(grovels thru google....)

http://mail.pm.org/pipermail/melbourne-pm/2007-October/002511.html

nearly 5 years ago! wow.

cheers,

- b.


More information about the Melbourne-pm mailing list