in reply to How to Switch off octal interpretation of literal ?

can this ancient octal feature of perl be switched off ?

I don't think so (and BTW, octals are still useful today in e.g. chmod).

But it sounds more like an XY Problem to me - it appears you're generating Perl source code. If you're doing that, why not generate the numbers as strings instead? When converting strings to numbers, leading zeros are ignored.

$ perl -wMstrict -le 'print 0+"023"' 23

Could you show the code that is generating your Perl code? I curious why there is need to chop numbers up and then interpret them as integers instead of strings.