|P is for Practical|
Remove digits from a string and add timestamp to the resultby suneel.reddy (Novice)
|on Jan 02, 2013 at 11:09 UTC||Need Help??|
suneel.reddy has asked for the
wisdom of the Perl Monks concerning the following question:
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.