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()) {
> 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?
>



-- 
David Schmidt   |   http://www.fm5.at

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to