in reply to Can't locate module in @INC when executing script over SSH
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't locate module in @INC when executing script over SSH
by Leudwinus (Scribe) on Jan 27, 2023 at 19:39 UTC | |
by haukex (Archbishop) on Jan 27, 2023 at 20:26 UTC |