I don't know why it crashes on your platform but Perl should give this error: Can't locate object method "parser" via package "#!perl" (perhaps you forgot to load "#!perl"?) at script.pl line 10, <INFILE> line 0.000000.
I certainly wouln't refrain you from using Linux, but your program runs correctly under Windows provided you look at the error message ("Can't locate object method "parser" via package...") and make the corrections accordingly.