develooper Front page | perl.perl5.porters | Postings from April 2008

Re: bug in if(open(my $fh,...))

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
April 29, 2008 12:08
Subject:
Re: bug in if(open(my $fh,...))
Message ID:
20080429180721.GP19658@klangraum.plasmasturm.org
Hi Vadim,

* KONOVALOV, Vadim (Vadim)** CTR ** <vkonovalov@alcatel-lucent.com> [2008-04-29 13:10]:
>> > BTW if (condition) {...} expands to condition && do {...};
>>
>> No it doesn't.
>
> yes it does
>
> D:\perl5100\lib\B>perl -MO=Concise -we "if($r>3){print 'qq'}"

you can also use Deparse, whose output is friendlier to read than
that from any of the optree dumpers. With the `-x7` switch it
won’t try to reconstruct familiar idioms from the optree but will
rather expose directly what’s in there:

    $ perl -MO=Deparse,-x7 -e'if($r>3){print "qq"}'
    $r > 3 and do {
        print 'qq'
    };
    -e syntax OK

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About