Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How to get substring between first and second character

by choroba (Abbot)
on Jan 17, 2013 at 17:49 UTC ( #1013842=note: print w/ replies, xml ) Need Help??


in reply to How to get substring between first and second character

You can use split, which uses a regular expression to specify the separator. Only retrieve the second field:

for my $string ("Database_Test_Access_DB", "Database_Development_Access_DB", ) { print((split /_/, $string)[1], "\n"); }
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: How to get substring between first and second character
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (14)
As of 2014-07-23 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (144 votes), past polls