Thanks for the response. but is there anyother way to do this?
On Mon, Nov 24, 2008 at 6:40 PM, Mr. Shawn H. Corey <[EMAIL PROTECTED]>wrote: > 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. > >