before and after are the comparison operators, which work with operands of different types. It returns a Boolean value of either True or False depending on which operand was considered to be ordered earlier or later.
Type coercion is similar to how it happens with the cmp operator.ย Remember that depending on the data types the comparison of similar-looking strings or numbers may give different results because the strings are compared alphabetically, while the numbers are ordered by their values:
say 10 before 2;ย ย ย ย ย # False say '10' before '2';ย # Trueย say 10 before 20;ย ย ย ย # True say '10' before '20'; # True