Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Zero Padding

by mkmcconn (Chaplain)
on Feb 03, 2001 at 22:40 UTC ( [id://56238]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -wl
    use strict;
    ...
       }xe and print for @_;
    }
    __END__
    
  2. or download this
    perl -wle ' s/^/("0"x(6-length))/xe and print for @ARGV;' 133 121 10 13
  3. or download this
    perl -wle ' s/^(\d+)/("0"x(6-length).$1)/xe and print or
        s/^(\w)/("\x20"x(6-length).$1)/xe and print for @ARGV;' 133 121 10
    + 13 red
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://56238]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-25 19:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found