in reply to Embedded Perl

I assume that it will act as if you type "perl foo.pl" on the command line--i.e. look for "foo.pl" in the current working directory.

If you are starting your program some way other than the command line (e.g., from IDE or double-clicking), you'll have to figure out what the CWD is or change it with chdir().