I have 3 different variables like:
my $tmp = 4; my $tmp1 = 37; my $tmp2 = "<="; #Now I want to use all these variables in if condition if($tmp2 $tmp1 $tmp) { print "Error"; } else { print "ok"; }
Now I am getting error at "IF" condition as "Scalar found where operator expected" Could anyone please tell me how to use $tmp2 in if condition.
Thanks --girijaIn reply to How to convert Scalar operator by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |