in reply to Any difference in conditionals?

You might be interested in how this parses with B::Deparse.

First, the test code:

if ($x1) { if ($x2) { print "here\n"; } } if ( $x1 && $x2 ) { print "here\n"; }

And now the output under 'deparse,-x9' (the greatest degree of deparsing):

C:\Perl\scripts>perl -MO=Deparse,-x9 mytest.pl $x1 and do { $x2 and do { print "here\n" } }; $x1 and $x2 and do { print "here\n" }; mytest.pl syntax OK

Surprised? :)

They are different, but also similar in more ways than you might initially guess. The biggest difference is nesting.


Dave