#! /usr/bin/perl use warnings; open (FF,"src.txt"); # fro where i have to read. open (FF1,">dest.txt"); # while () { $lin=$_; print FF1 $lin; if (/input/) # input i a word after dat all paragraph shud be copied till other wor is not encounterd diz word is #repeated is present twice in given file {$i=0 while() { @arr =$_; print FF1 @arr; $i++; exit if ($arr =~/term/); } } } while () { for ($j=0;$j<$i;$j++) { print FF1 @arr[$j]; } }