in reply to Syntax error - beginner question
You cannot do a double-comparison as a single expression. The answer is to use the logical and operator to chain two expressions.
if ( $X > 9 and $X < 100 ) { $Y = $X + 1900; } elsif ( $X >= 0 and $X < 10 ) { $Y = $X + 2000; }
By the way, that's just one way to do it.
Dave
|
|---|