On Thu, Jul 26, 2012 at 8:29 AM, Shmuel Fomberg <[email protected]>wrote:

> Hi All.
>
> You probably know that the construct:
> my <variable> = <something> if <condition>;
> is problematic.
>

I never had such lines, probably because I never found it readable.
I write
if ( my $variable = <something ) {
    ..
}

but that doesn't cover false arguments so if I'm looking at numbers, this
obviously isn't good.

But if numbers are involved I'll probably write:
my $number = <something>;
if ( defined $number ) {
    ...
}
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to