# New Ticket Created by  Aleks-Daniel Jakimenko-Aleksejev 
# Please include the string:  [perl #131361]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131361 >


Code:
say 02

Result:
Potential difficulties:
    Leading 0 does not indicate octal in Perl 6. Please use 0o2 if you mean 
that.
    at -e:1
    ------> say 02⏏<EOL>
2


To see the problem with this error message, let's see this task from thinkperl6 
book:

3. In math notation, leading zeros are OK, as in 02. What happens if you try 
this in Perl?


Indeed, sometimes you'd think that leading zeros should do nothing. In fact, I 
remember myself writing numbers with leading zeros a couple of times, and I 
remember zero times I actually needed something in octal.

Is there any way we can improve the error message so that it includes this 
situation as well (i.e. using leading zeros to mean nothing)? Please also 
consider that 6 year old kids may not know what octal is, but the error message 
should be understandable anyway.

Reply via email to