perl - Setenv $PATH not functioning properly -


i wrote shell script sets $path variable directory contains shell , perl script.

i able run shell script current working directory set random directory, perl script different.

is there difference between running two?

the error thrown is

can't open perl script "script.pl" : no such file or directory 

though file exists in same folder shell script.

when run script "perl script.pl", system use path environment locate perl interpreter not script. script name being passed interpreter arg. if script not in cwd, you'll need include path.

just running "script" shows permissions denied , running "script.pl" shows command not found.

that tells me 2 things. 1) script's name doesn't include .pl ext , 2) when called without ext, find script within path permissions aren't set correctly execute it.

as has been stated others, need assign correct permissions allow execute script.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -