如何用perl從一串文字得到它的區間範圍?

如何用perl從一串文字得到它的區間範圍?

請高手幫幫忙~多謝!
有個文字檔內容如下:
CONTOUR, positive, HOLES_NUM = 0
    FROM, 69695, 4365
    LINETO, 69695, 2341
    LINETO, 41828, 2341
    LINETO, 41828, 4365
    LINETO, 69695, 4365
CONTOUR_END
CONTOUR, positive, HOLES_NUM = 0
    FROM, 167837, -16156
    LINETO, 167837, -22022
    LINETO, 161971, -22022
    LINETO, 161971, -16156
    LINETO, 167837, -16156
CONTOUR_END
CONTOUR, negative, HOLES_NUM = 0
    FROM, 163390, -55531
    LINETO, 163390, -55054
    LINETO, 165636, -55054
    LINETO, 165636, -55531
    LINETO, 163390, -55531
CONTOUR_END
已知一個問題字串LINETO, 165636, -55531
請問該如何用perl去過濾
然後得到另一個文字檔,內容如下:
CONTOUR, negative, HOLES_NUM = 0
    FROM, 163390, -55531
    LINETO, 163390, -55054
    LINETO, 165636, -55054
    LINETO, 165636, -55531
    LINETO, 163390, -55531
CONTOUR_END

$/和正则都很容易.
我也想知道程序怎么写?
很简单的正则匹配就能完成,LZ急用么?
简单为什么没人给写一个呢?
过年了, 你看着办吧
use strict;
use warnings;

local $/ = "CONTOUR_END\n";
my $expLine = 'LINETO, 165636, -55531';

while (<DATA>) {
    print $_ if /(\Q$expLine\E)/;
}

__DATA__
CONTOUR, positive, HOLES_NUM = 0
    FROM, 69695, 4365
    LINETO, 69695, 2341
    LINETO, 41828, 2341
    LINETO, 41828, 4365
    LINETO, 69695, 4365
CONTOUR_END
CONTOUR, positive, HOLES_NUM = 0
    FROM, 167837, -16156
    LINETO, 167837, -22022
    LINETO, 161971, -22022
    LINETO, 161971, -16156
    LINETO, 167837, -16156
CONTOUR_END
CONTOUR, negative, HOLES_NUM = 0
    FROM, 163390, -55531
    LINETO, 163390, -55054
    LINETO, 165636, -55054
    LINETO, 165636, -55531
    LINETO, 163390, -55531
CONTOUR_END