/pattern/../pattern/
べんりかもなぁ。。
#こういうファイルを入れると =pod this is 1 and next this is 2 and next this is 3 and next this is 4 and next this is 5 and next this is 6 and next this is 7 and next this is end and next this is after 1 this is after 2 =cut while(<>){ if(/2/../4/){ print; } } #こうなる =pod this is 2 and next this is 3 and next this is 4 and next this is after 2 =cut #/pattern/.../pattern/ #...もあって動作が違うとかなんとか