in reply to file handles and file input

The while (<IN>) is reading a line from the file (and placing the result in $_) and then you are reading yet another line with

$string_parser = <IN>;

So that's why $string_parser is being set to every other line.