Note how the two @INCs are different. When you ssh into the remote machine, the script is getting executed directly; there's no login shell to execute your ~/.profile and therefore it doesn't set up your local::lib environment variables like PERL5LIB, so that's why those directories aren't showing up in your @INC. Try putting a use local::lib; At the top of your script. And by the way, always Use strict and warnings!
In reply to Re: Can't locate module in @INC when executing script over SSH
by haukex
in thread Can't locate module in @INC when executing script over SSH
by Leudwinus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |