Help with a wrapper script not working

Hello,
I have the below wrapper script:

#!/usr/bin/perl -w

if ($^O eq 'MSWin32' ) {
$subnet = 'c:\path\to\subnet.txt';
}
else {
$subnet = '/opt/qip/wrapper-del-sub';
}

open FH1, 'jj-deleted-subnets.txt' or die "Can't open 'jj-deleted-subnets.txt'
$!";

while ( $line1 = <FH1> ) {
$line1 = <FH1>;
$line2= <FH1>;
open FH2, '>wrapper-del-sub' or die "wrapper-del-sub' $!";
print FH2 $line1,$line2;
close FH2;
system("kip-dgl -u xx -p xx -f $subnet -t subnet -a -o abc >> log.txt
2>&1");
}
close FH2;

What I am trying to have done is process a file 1 line at a time that which has this format in jj-deleted-subnets.txt
10.45.1.0
10.45.41.0
10.45.48.0
10.128.187.0

My goal was to write this so it takes the jj-deleted-subnets.txt yanks out the first line which in this case is 10.45.1.0 then puts it into a scratch file called wrapper-del-sub, then issue a command
kip-dgl -u xx -p xx -f $subnet -t subnet -a -o abc >> log.txt 2>&1");

Finish it, then loop back and do the next line which is 10.45.41.0 and so on and so forth until its done.

My above script is broken and I cant figure it out. The error is

Use of uninitialized value at ../wrapper-del-sub.pl line 16, &lt;FH1&gt; chunk 145.

Use of uninitialized value at ../wrapper-del-sub.pl line 16, <FH1> chunk 145

Thanks