in reply to Re^3: chopping the beginning and end of lines in 2 files
in thread chopping the beginning and end of lines in 2 files

then you might like:

$_->[1] >= 15 && last or ++$beg for @data; $_->[1] >= 15 && last or ++$end for reverse @data;

Perl reduces RSI - it saves typing