in reply to Removing digits from a string
now I need to truncate 20130101 from the file name
As someone else mentioned, I'm not sure the word "truncate" quite fits. Here's a solution that gives you a bit more flexibility:
This will result in the scalar $dateStamp containing "20130101" and $basename containing "Customer100". The presumption I made (you didn't specify otherwise) was that your filenames all have the extension "imp" and as long as they do the regex I supplied you will work. I leave it as an exercise in intellect for you to modify the regex if there are other extensions involved.
| hand waving here...
my $fname = "20130101Customer100.imp"; # gotta go somewhere..
$fname =~ m@^(\d+)([A-Za-z0-9]+)\.imp$@; # Capture what we are looking
| do something with this.
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg