Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, i have downloaded the latest perl6 files from http://sourceforge.net/projects/parrotwin32/files/ , and tried the following code:
my $num = prompt("Please write a number : "); say $num; $num +=3; say $num;

if you enter any number below 10 such as 5 then the results will be like this:
5
3

if you enter any number equal or over 10 such as 42 then the results will be correctly like this:
42
45

what i miss. i am using windows xp/sp2
regards

Replies are listed 'Best First'.
Re: perl6: problem with prompt
by moritz (Cardinal) on Jun 06, 2010 at 09:12 UTC

    Your snippet works for me with the current development version of rakudo under linux.

    Could you please try to build the latest rakudo from source and see if it still fails?

    Also please add this line after the prompt:

    say $num.PARROT;

    and tell me what it prints.

    Perl 6 - links to (nearly) everything that is Perl 6.
      i have tried your suggestion:
      my $num = prompt("Please write a number : "); say $num.PARROT; $num +=3; say $num.PARROT;
      the result is this:
      String
      Num

      it gives the same result whether the number below 10 or more
      regards
        Can you please also try it with a current development version of Rakudo?