From: "suresh kumar" <[EMAIL PROTECTED]> > Here is the sample code: > > sub a { > print "i am a\n"; > return 0; > } > > sub b { > print "i am b\n"; > return 1; > } > > if (a() && b()) { > print "yes\n"; > } else { > print "no\n"; > } > > > > I want both the subroutine to be executed, and then i want print some > statements depending upon both the results. > here if a() returns "0" then b() was not getting executed. > > is there any other way to do this check?
Is there any reason you want to do that? Other than that some braindead languages work that way? Complete evaluation of conditions is one of the most annoying features of any language. If rstBlah.EOF Then bla bla bla ElseIf rstBlah.Field("foo").Value = sumfin Then the very same bla bla bla Else ... anyone? If you want to evaluate both and then check their results, do evaluate them both and then do check their results. Fullstop. There is no way to turn on complete condition evaluation and there should not be. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/