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

Remove zero from 01, 02, etc.

Thread Next
August 19, 2009 13:02
Remove zero from 01, 02, etc.
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About