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

Re: How to get substring between first and second character

by choroba (Chancellor)
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"); }
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ