It sounds like whatever is executing the Perl code is not CD'ing to the right directory. cgi-handler should do this, which makes me wonder if something else is trying to run it. Is mod_perl in use or something? Wakaba doesn't really work with mod_perl without tweaking.
So, the solution should be to either configure Apache to use cgi-handler for .pl files, or if that still doesn't work, you can try adding a BEGIN { chdir "path-to-files" }
at the top before the other BEGIN
statements. But the first is more likely to help.