Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Removing digits from a string

by johngg (Abbot)
on Jan 01, 2013 at 12:39 UTC ( #1011148=note: print w/ replies, xml ) Need Help??


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


Comment on Re: Removing digits from a string
Download Code
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011148]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-09-20 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (159 votes), past polls