Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi Monks, I have a string that looks like this:
I want to add one to the number - making this into Now I know I can parse the digits in the string, add one and format it with sprintf to keep the zeroes. Then I can concatenate the letter part and it will work. However, since this is Perl, there has to be a quicker and more elegant way to do this. And ideas? Mr. Guy 'You earnest Sage!' aloud they cried, 'your book you've read enough in! 'We wish to chop you into bits to mix you into Stuffin!' Update: received some pretty cool and elegant answers. Thanks!! In reply to Increment a string with letters and numbers by mrguy123
|
|