Perl 6 Perl 6 #11

Consistent data type prefixes

Perl 6 allows explicit numeric (+), string (~), and boolean (?) prefixes to values and operators:

+$a            # $a as a number
~$a            # $a as a string
?$a            # $a as a boolean

+|             # numeric or
~|             # (string) or
?|             # boolean or
Copyright © 2008 Patrick Michaud