http://www.perlmonks.org?node_id=1011148


in reply to Removing digits from a string

If that date format is consistent, use substr!

$ perl -E ' > $filename = q{20130101Customer100.imp}; > say $filename; > substr $filename, 0, 8, q{}; > say $filename;' 20130101Customer100.imp Customer100.imp $

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: Removing digits from a string
by suneel.reddy (Novice) on Jan 02, 2013 at 08:51 UTC

    Thank you John, thanks a lot...!!! yes - my filename will have a constant format. So,I hope substr works.