in reply to Remove digits from a string and add timestamp to the result
This depends on the exact format of the filename. But possible the following example will give you an idea:
HTH! Ratamy $filename = "customer100"; my $timestamp= "02012013"; $filename =~ /(\w+)(\d+)/; # split filename into "custome +r" and "100" $filename = $1."_".$timestamp."_".$2;
|
---|
In Section
Seekers of Perl Wisdom