On Mon, 2004-10-25 at 11:39, Khairul Azmi wrote:
> I am not sure what category should this question fall under but this
> is what I plan to do.
> 
> $cond1 = 1;
> $cont2 = 0;
> $oper1="&&"; # for AND
> $oper2="||"; # for OR
> 
> if ($cond1 $oper1 $cond2) {
>   print "one \n";
>  } else {
>   print "two \n";
> }
> 
> The statement above would generates errors. Can somebody tell me how
> to do it in proper way. Thanks
> 
> Azmi

Hi, did you try to use the function eval? 

Check perldoc

I think this should help you.

Gabaux


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


Reply via email to