Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Extract string after removing the substring

by Athanasius (Chancellor)
on Oct 24, 2012 at 15:31 UTC ( #1000658=note: print w/replies, xml ) Need Help??


in reply to Extract string after removing the substring

Here’s another way:

If you don’t need the original string anymore, just give an empty string as the REPLACEMENT argument to substr:

1:26 >perl -E " $string = qq[ATATTTATATTAT]; say $string; $removed = +substr($string, 0, 3, q[]); say $removed; say $string; " ATATTTATATTAT ATA TTTATATTAT 1:30 >

Hope that helps,

Athanasius <°(((><contra mundum

Replies are listed 'Best First'.
Re^2: Extract string after removing the substring
by viktor (Acolyte) on Oct 24, 2012 at 15:37 UTC
    thanks!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000658]
help
Chatterbox?
choroba knows the situation. At work, unit tests run for 30 minutes, and integration and end-to-end tests take almost one hour.
[stevieb]: yeah. This is my build/test software that manipulates perlbrew/ berrybrew, and runs all unit tests of a project against all installed versions, including testing a dist against all of it's current revdeps. A lot of tests it runs for itself:)
[stevieb]: testing the test build system, essentially

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2017-03-26 22:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (315 votes). Check out past polls.