Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: zero padding

by RazorbladeBidet (Friar)
on Feb 09, 2005 at 19:27 UTC ( [id://429481]=note: print w/replies, xml ) Need Help??


in reply to zero padding

When you concat, you need to

$var1.sprintf( "%04d", $var2 );

or

$var1.("0" x (4-length( $var2 ))).$var2

Replies are listed 'Best First'.
Re^2: zero padding
by trammell (Priest) on Feb 09, 2005 at 20:04 UTC
    Dang, did you travel back in time from after Perl 6 was released?
      ???

      Update: Please explain - those work just fine on my 5.8.0 - am I missing something? (obviously!)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-23 07:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found