Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 scrutinizing the Monastery: (10)
As of 2015-07-04 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls