i m rewriting the current code here i m printing the give n part but i want it in between.
use warnings;
use strict;
my $fg=0;
my $i=0;
open(FF ,"lib");
open (FF1,>lib1");
while(<FF>)
{
my $lin =$_;
print FF1 $lin;
if ($lin=~m/pattern to be patched for stat copying/)
{ $fg=1;
}
if ($fg)
{
$lin=$_;
my @arr =$lin[$i];
$i++;
}
if($lin=~m/pattern where to stop copying & repeating/)
{ $fg=0;
}
}
if ($fg==0)
{
for (my $j=0;$j<$i;$j++)
{
print FF1 @arr[$j];
}
}
i want to actuaaly print the given para in between here using these script i am print @ end of file.