sub peel { my( $s, $n ) = @_; my( $start, $stop ) = ( 0, length $s ); ($start,$stop) = ( 1 + index( $s, '(', $start ), rindex( $s, ')', $stop -1 ) # reformatting_for_posting error corrected # Was ) while $n-- > 0 and index( $s, '(', $start +1 ) > 0; ) while $n-- and index( $s, '(', $start +1 ) > 0; substr $s, $start, $stop - $start; } Rate mine-less-lgnt buk2 mine-less-lgnt 918/s -- -15% buk2 1075/s 17% --