Re: equality as a variable
- From: Brian Wakem <no@xxxxxxxxx>
- Date: Fri, 30 Sep 2005 17:48:11 +0100
Shiraz wrote:
> i need to put the equality in an if statement as a variable
>
> ($val1, $val2, $comp) = (1,2,"gt");
> if ($val1 $comp $val2)
> { print $val1; }
> i couldnt find anything in the achives.... if some knows it, please let
> me know.. or point me in a direction i can research the method.
> thanks
if (eval("$val1 $comp $val2")) {
....
}
--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
.
- Follow-Ups:
- Re: equality as a variable
- From: A. Sinan Unur
- Re: equality as a variable
- From: Shiraz
- Re: equality as a variable
- References:
- equality as a variable
- From: Shiraz
- equality as a variable
- Prev by Date: Re: Perl calculate and average problem
- Next by Date: website development and maintenance, using Perl. Please help!
- Previous by thread: equality as a variable
- Next by thread: Re: equality as a variable
- Index(es):