Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: zero padding

by zentara (Archbishop)
on Feb 09, 2005 at 19:43 UTC ( [id://429487]=note: print w/replies, xml ) Need Help??


in reply to zero padding

Thanks for the ideas. This is what I came up with and seems to work. (Had to re-read perldoc -q zero a few times)
sub connectm{ my ($val1,$val2) = @_; print "in-> $val1 $val2\n"; my $padded = '0' x ( 4 - length( $val2 ) ) . $val2; return ($val1.$padded); }

I'm not really a human, but I play one on earth. flash japh

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-25 17:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found