Hi All,

What is with the starting ending Nils?  There are only four
elements, why now six?

And how to I correct this?

$ p6 'my Str $x="abcd";
     for split( "",@$x ).kv -> $i,$j {
     say "Index <$i> = <$j> = ord <" ~ ord($j) ~ ">";}'

Use of Nil in string context
  in block  at -e line 1
Index <0> = <> = ord <>         <----------------- nil ???
Index <1> = <a> = ord <97>
Index <2> = <b> = ord <98>
Index <3> = <c> = ord <99>
Index <4> = <d> = ord <100>
Use of Nil in string context
  in block  at -e line 1
Index <5> = <> = ord <>         <----------------- nil ???


Many thanks,
-T

Reply via email to