|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Remove digits from a string and add timestamp to the resultby suneel.reddy (Novice) |
| on Jan 02, 2013 at 11:09 UTC ( #1011248=perlquestion: print w/ replies, xml ) | Need Help?? |
|
suneel.reddy has asked for the
wisdom of the Perl Monks concerning the following question:
Hi Monks, This post is an extention of earlier post. I have a file name like - 20130101Customer100.imp , now I need to truncate 20130101 from the file name. based on the solutions offered from earlier post, I made it as, $file =~ s/^\D*\d+// ; which gave me 'Customer100' after removing the extention (.imp) Okay...now the problem is - I need to insert some timestamp between 'Customer' and '100'. It should look like Customer_<TimeStamp>_100. I can get the timestamp, but not sure how to fit it in that string. Please help me.....!!!! Thanks in advance.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||