[kw-pm] what is "truth value" in perl 6?

Robert P. J. Day rpjday at mindspring.com
Wed Jul 9 16:10:53 CDT 2003


  from what i'm reading, perl 6 *seems* to extend the notion of
boolean values from perl 5 in defining a real "truth value" of 
a variable.

  according to the book, "The unary ? operator ... forces boolean 
context... With the ? operator, you can force boolean context and 
assign the truth value of a variable instead of the numeric value."

  $value = $number ;		# standard assignment
  $value = ?$number ;		# assign truth value of $number

but what exactly would be assigned?  a zero or one?  is this
referring to an inherent true or false value that i haven't 
seen described yet?  

rday




More information about the kw-pm mailing list