in reply to nested if statement wont work

First, a hint: add

use strict; use warnings; # this has advantages over the -w option
I believe you'll get a bareword warning on the inner test (if($column[1] eq IN); the bareword IN is probably undef, which will probably not match $column[1]

So, my second suggestion: get rid of the bareword warning you'll probably get with IN

emc

"Being forced to write comments actually improves code, because it is easier to fix a crock than to explain it. "
—G. Steele