how can i do something like that in perl?myString = '123_456' print myString.split('_')[1] --- you get '456'
edit: i actually answered myself correctly with my pseudocode description. there was a typo elsewhere in the program that made this not look right. i'm leaving this here for others.$myString = '123_456' print ( split '_' , $myString )[1] --- you get '456'
In reply to python-like split+array access -- possible? by nmerriweather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |