in reply to file handles and file input

Try:

while(my $string_parser = <IN>) {

instead of while(<IN>) which reads a line into $_, then $string_parser = <IN> which reads the next line into $string_parser - effectively throwing away the previous line.


Perl is environmentally friendly - it saves trees