September 2017
Beginner
402 pages
9h 52m
English
The eq and ne operators compare two strings and return a Boolean value.
say 'abc' eq 'abc'; # Truesay 'abc' ne 'def'; # True
The non-string operands are converted to strings before comparison, as follows:
say 13 eq '13'; # True
To compare numbers, use the == and != operators.
Read now
Unlock full access