Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Leading Zeros

Status
Not open for further replies.

wood

MIS
Aug 3, 2000
139
0
0
CA
I am looking for the best way to remove leading zeros from numbers.

For example I have the following numbers:
0032104595
0159789956
0001649850
1234859782

I need to remove leading zeros so the numbers end up to be:
32104595
159789956
1649850
1234859782

Any assistance would be appreciated.
 
Thanks for the reply, but I used this:
$var =~ s/^0+//;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top