Hi All,

Yes, I know, Perl is "lexiconical".

$ perl6 -e 'my $x="abc"; $x=1E23; print "$x\n";'
1e+23

$ perl6 -e 'my Str $x="abc"; $x=1E23; print "$x\n";'
Type check failed in assignment to $x; expected Str
but got Num (1e+23) in block <unit> at -e line 1

So, unless I specifically declare a variable as a
particular type, I can change its "type" on the fly.
Is that correct?


Many thanks,
-T


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to