|
||||||
| 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 |
| John | ........ | 223.00000 |
| dargueta | ........ | 168.00000 |
| Xav | ........ | 164.00000 |
| gaylo565 | ........ | 18.00000 |
| WingedPanther | ........ | 15.00000 |
| |pH| | ........ | 15.00000 |
| Johnnyboy | ........ | 3.00000 |
| navghost | ........ | 1.00000 |
Goal: 100,000 Posts
Complete: 65%