Re: Regarding conditional statement

2008-11-24 Thread Mr. Shawn H. Corey
On Mon, 2008-11-24 at 16:34 +0100, Jenda Krynicky wrote: > 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

Re: Regarding conditional statement

2008-11-24 Thread suresh kumar
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; > > }

Re: Regarding conditional statement

2008-11-24 Thread Chas. Owens
On Mon, Nov 24, 2008 at 08:15, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > On Mon, 2008-11-24 at 18:41 +0530, suresh kumar wrote: >> Thanks for the response. >> >> but is there anyother way to do this? >> > > You just got three answer all essentially the same. What's wrong with > them? snip W

Re: Regarding conditional statement

2008-11-24 Thread Jenda Krynicky
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

Re: Regarding conditional statement

2008-11-24 Thread Mr. Shawn H. Corey
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 t

Re: Regarding conditional statement

2008-11-24 Thread Mr. Shawn H. Corey
On Mon, 2008-11-24 at 18:41 +0530, suresh kumar wrote: > Thanks for the response. > > but is there anyother way to do this? > You just got three answer all essentially the same. What's wrong with them? -- Just my 0.0002 million dollars worth, Shawn The map is not the territory, the do

Re: Regarding conditional statement

2008-11-24 Thread Dr.Ruud
"suresh kumar" schreef: > I want both the subroutine to be executed, and then i want print > some statements depending upon both the results. my $all = 1; a() or $all = 0; b() or $all = 0; c() or $all = 0; if ($all) { ... } -- Affijn, Ruud "Gewoon is een tijger."

RE: Regarding conditional statement

2008-11-24 Thread Stewart Anderson
> -Original Message- > From: suresh kumar [mailto:[EMAIL PROTECTED] > Sent: 24 November 2008 10:41 > To: beginners@perl.org; [EMAIL PROTECTED]; Amit Saxena > Subject: Regarding conditional statement > > Hi, > > Here is the sample code: > > sub a

Re: Regarding conditional statement

2008-11-24 Thread David Schmidt
my $ret_a = a(); my $ret_b = b(); if ($ret_a && $ret_b) { (...) } On Mon, Nov 24, 2008 at 11:41 AM, suresh kumar <[EMAIL PROTECTED]> 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()) { > pr

Regarding conditional statement

2008-11-24 Thread suresh kumar
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() ret