>>>>> "G" == Grant <[email protected]> writes:
G> I have a variable which could contain any number from 01-12. I need G> to remove the leading zero from numbers 01-09, otherwise I get an G> "octal digit" error when the number is used in a calculation. Can G> anyone show me how to remove that leading zero? you shouldn't get an octal error if that is in a variable. octal numbers are only literals in the text or you need to call oct or hex to convert. please show a complete working but small example of code and data that displays the error you are seeing. there are no warnings here: perl -wle '$x = "01" ; print $x + 2' 3 uri -- Uri Guttman ------ [email protected] -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
