in reply to -c

I think there are actually several reasons why. But I only really understand one, so that's the only one I'll comment on. :)

You're right when you say that you could dynamically create the function. You can do this using a special subroutine called AUTOLOAD--if you call a function in a particular package, and that function doesn't exist, Perl looks for an AUTOLOAD function in your package. Among other things, you can use that AUTOLOAD function to create other functions on the fly and run them. From perltoot, in case you want a clearer explanation:

When Perl tries to call an undefined function in a particular package and that function is not defined, it looks for a function in that same package called AUTOLOAD. If one exists, it's called with the same arguments as the original function would have had.
Another way to dynamically create functions is eval. Things that you wrap in an eval aren't executed until runtime (ie. not at compile time), so if you're using an eval to dynamically create a subroutine that you'll later call, there's no possible way for Perl to know about this function. It's perfectly valid Perl, though, so you won't get an error.

See, I could write this:

#!/usr/local/bin/perl -w use strict; my $code = <<CODE; sub foo { print "in foo\n"; } CODE eval $code; foo();
At compile time, Perl doesn't know that a subroutine called foo is going to exist. But it doesn't complain. And I can run it:
% foo.pl in foo
and everything's fine.

In terms of your particular problem... I'm not sure what to suggest. Would it be possible for you to use eval to check the syntax of the script? Then you could catch any errors, but your own script wouldn't die.