On Mon, 2008-11-24 at 16:11 +0530, suresh kumar wrote: > Hi, > > 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?
my $result_a = a(); my $result_b = b(); if( $result_a && $result_b ){ print "yes\n"; }else{ print "no\n"; } -- Just my 0.00000002 million dollars worth, Shawn The map is not the territory, the dossier is not the person, the model is not reality, and the universe is indifferent to your beliefs. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/