while ($str =~ /,/g) { $p = $-[0], last if !--$nth } [download]
In reply to Re^2: search for nth occurrence of a pattern in a line by japhy in thread search for nth occurrence of a pattern in a line by deepa