Hmm
[ddg://perlfaq nth site:perldoc.perl.org]
perlfaq nth site:perldoc.perl.org
-> perlfaq4#Data: Strings
#Data: Strings
#How do I change the Nth occurrence of something?
#How can I split a [character]-delimited string except when inside [character]?
Close, but no cigar
You can use split
my $fifth = ( split m{/}, $string )[4];
In reply to Re^3: Question on Regex
by Anonymous Monk
in thread Question on Regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |