develooper Front page | perl.beginners | Postings from August 2009

Remove zero from 01, 02, etc.

Thread Next
From:
Grant
Date:
August 19, 2009 13:02
Subject:
Remove zero from 01, 02, etc.
Message ID:
49bf44f10908191301w8fee91fr97eb3eaab7cf75f8@mail.gmail.com
I have a variable which could contain any number from 01-12.  I need
to remove the leading zero from numbers 01-09, otherwise I get an
"octal digit" error when the number is used in a calculation.  Can
anyone show me how to remove that leading zero?

- Grant

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About