Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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 $



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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011148]
[erix]: in this context, one learns all kinds of interesting psychological excuse-jargon: not just 'alternative facts'; how about 'gapped knowledge' ? :)
[erix]: which still manages to sound more or less positive
[Corion]: Huh. I wasn't aware that you cannot segregate Python 2 and Python 3 modules... Hopefully Perl 6 module use C6AN and thus avoid the problem...
[hippo]: I very much hope so.
[moritz]: there are already some (very few) Perl 6 modules on CPAN, but in a way that the p5 indexer avoids them

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2017-01-24 09:17 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (203 votes). Check out past polls.