in reply to Re^2: If statement issue from a Noob
in thread If statement issue from a Noob

Note that the extra set of braces around print FH_OUTFILE "\n"; makes it look at first glance like you're missing an else when you're actually not (since it seems this is based on 1nickt's initial code), I recommend removing them. Also, you should take holli's advice (and as several others have shown) to use more descriptive variable names.

I apologize in advance for the bad formatting

Why apologize when you can fix it? ;-) Or at least have perltidy do it for you.