in reply to syntax error at labmonkey.pl line 1, at EOF

That error doesn't sound like something Perl would give. Is that the error message exactly? Are you sure perl is being used?

And line 1 isn't near EOF. Are the line endings correct? Again, Perl shouldn't care about that.