13:52 < zulon> rakudo: say "3".Num
13:52 < p6eval> rakudo d95def: OUTPUT«Method 'Num' not found for
invocant of class 'Str'»
13:52 <@moritz_> zulon: that should work
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] all...@kf8nh.com
system administrator [openafs,heimdal,too many hats] all...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
+ is numeric context - which is one of several subtypes of item
context. Generic item context is item(); + numifies; ? boolifies; ~
stringifies.
I'm guessing you saw + used to get the length of an array, and that's
where you got that it's equivalent to P5 scalar().
--
Mark J. Reed <mark...@gmail.com>
When in doubt, check the spec. :)
S03 (]):
] Unlike in Perl 5, where + is a no-op, this operator coerces to
] numeric context in Perl 6.
So prefix:<~> stringifies, prefix:<+> numifies, and prefix<?> boolifies.
There's some kind of nice symmetry to that, isn't there?