Octavian, Secondly, by your explanation, I'm not sure whether you know this, but your if should be like this: -------------------------- my $test = sub_name(); if ($test){ # stuff } -------------------------- Or -------------------------- if (sub_name()){ # stuff } --------------------------
Regards, David ----- Original Message ----- From: "Shawn" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, June 23, 2002 9:27 PM Subject: Re: return =1 Hello Octavian, You need to say return(0) or return(1), not return = 0 or 1. Shawn ----- Original Message ----- From: "Octavian Rasnita" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, June 23, 2002 1:33 AM Subject: return =1 > Hi all, > > If I put at the end of a subroutine a line: > return = 0; > or > return =1; > > How can I check if the return value is true or false? > > I've tried with > if (subroutine_name) { > .... > } > > But it always give me the true value. > > Am I missing something, or am I doing something wrong? > > > Thanks. > > Teddy Center for the blind: http://teddy.fcc.ro/ > Mail: [EMAIL PROTECTED] > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]