Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^11: appending a variable

by Marshall (Canon)
on May 01, 2022 at 00:02 UTC ( [id://11143480]=note: print w/replies, xml ) Need Help??


in reply to Re^10: appending a variable
in thread appending a variable

well, after getting the digits, check if a single digit, if so, add leading zero. Note this also handles the 0->00 case.
$digits =~ s/^(\d)$/0$1/; # add leading zero if only one digit # 0->00 1->01 2->02 etc.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-04-24 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found