Even though I have local::lib installed on the remote machine, I now get this error: Can't locate local/lib.pm in @INC
Do you know where you installed it? If you have root access to the remote machine, you could install local::lib to the system Perl (e.g. on Debian-based systems: sudo apt-get install liblocal-lib-perl), or you could ask the admin to do so.
So any other suggestions would still be appreciated.
Sure, there are lots of other ways. For example, you could build your own Perl in your home directory using perlbrew, that'll then be a self-contained install with all modules in its installation directory, so that when you run your script on that perl, there'll be no confusion about where the modules are because they'll all be in the @INC compiled into Perl. I list a few more ways of how to set @INC in this node, but which one is best in your case depends on several factors, like whether you have root on the remote machine, whether you can build your own Perl, whether this script is going to need to be portable across many machines, or just one or two, and so on - if you provide more details on your situation we can probably make better recommendations.
Edited to add
AFAICT that's not the only edit you made, at first your node didn't contain the error message regarding local::lib. Please mark all significant edits, see How do I change/delete my post?