Table 5-2. Compare values
| Expression | Value |
| "12.0" == 12 | TRUE |
| "12.0" eq 12 | FALSE |
| 2 < 3 | TRUE |
| 2 lt 3 | TRUE |
| 12 > 3 | TRUE |
| 12 gt 3 | FALSE ! |
| "" == "hello" | TRUE ! (Warning) |
| "" eq "hello" | FALSE |
| "hello" == "world" | TRUE ! (Warning) |
| "hello" eq "world" | FALSE |
When reading from STDIN you can always expect a string
| Prev | Home (Copyright Gabor Szabo) Perl Training Israel | Next |
| Compare values | Up | Boolean expressions (logical operators) |