in reply to panic error message

You should show us the actual "test.pl" script, the exact error message (with the actual line number instead of "xx"), and make it clear in posting "test.pl" exactly where the cited line number is in the script.

If you just do this at the shell command line, I expect that you won't get an error:

perl -le 'print "hello, world!"'

So the question is, what does your "test.pl" do besides that? No solution to your problem, until you show us more info (or figure it out on your own).