|
||||||
| Perl Discussion for the PERL language - Practical Extraction and Reporting Language, is a programming language often used for creating CGI programs. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
I've been tasked with another "fix" which seems simple but isn't (to me). I need to remove all leading 0s of a string:
"00000002035" needs to be " 2035" Is there some function I can use to do this already? The spacing needs to remain the same though.
__________________
I Need Help Last edited by NeedHelp; 03-29-2007 at 11:33 AM. Reason: Forgot to mention |
| Sponsored Links |
|
|
|
|||
|
I found this:
Perl Reference which lead me to making this: Code:
$mystring =~ s/^0*//;
$mystring = sprintf("%- 18s", $mystring);
__________________
I Need Help |
|
|||
|
Quote:
|
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to remove your second XP without formating - [With Video] | Onur | Tutorials | 1 | 08-31-2007 07:42 AM |
| Remove Autofill in FF | falco85 | JavaScript and CSS | 1 | 07-04-2007 10:19 AM |
| Tutorial to Remove the Virus "Trojan horse Startpage.ADE" | clookid | Tutorials | 9 | 01-09-2007 09:39 PM |
| Xav | ........ | 1024.41 |
| MeTh0Dz|Reb0rn | ........ | 974.08 |
| morefood2001 | ........ | 850.04 |
| John | ........ | 841.93 |
| WingedPanther | ........ | 661.52 |
| marwex89 | ........ | 575.59 |
| Brandon W | ........ | 456.18 |
| chili5 | ........ | 292.12 |
| orjan | ........ | 187.41 |
| Steve.L | ........ | 181.88 |
Goal: 100,000 Posts
Complete: 79%