
freddo
User
Apr 12, 2001, 12:02 AM
Post #3 of 4
(367 views)
|
Hello airo, here's how to do:if ($t >=5 && $t<=9) { $total=$t*10 } else { $total=0; } you may probably want to check the perldoc perlop man page about C-Style Logical AND (&&). And like there's more than one way to do it:$total = ( $t>=5 && $t<=9 ) ? $t*10 : 0; (still on the perldoc perlop but about Conditional Operator (?)) i hope this helps freddo ; ----- Real Programmers dont need class, They just have style...
|