Maybe your server has two Perl interpreters installed (don't ask me why, but it could happen). So when you type from shell, let's say
perl ./myscript.pl, you're calling a different perl than /usr/bin/perl: so, with different libraries directories and so on. Try which perl from shell. I hope it could be useful.