P
Public Interest
I put my Perl script in a unix shell now. The filename is abc.pl
If I run "perl abc.pl", it works perfect
but if I run "perl /abs-path/abc.pl", it gave me the error file now found in
abc.pl. I opened several files in abc.pl. I think the perl script abc.pl use
the path veriable on the shell not where abc.pl sites. Because I want my
script to be portable, so I don't wnat to change the relative path within
abc.pl, so how do I tell abc.pl to set default path?
Anoher problem is that I run several scripts at once, and I put them in a
..sh file as
perl 111.pl
perl 222.pl
perl 333.pl
and I made the .sh file chmod 777, but when I type the file name RUN.sh, it
still tells me "command not found". I am not sure it is a shell problem or I
set up something wrong here.
If I run "perl abc.pl", it works perfect
but if I run "perl /abs-path/abc.pl", it gave me the error file now found in
abc.pl. I opened several files in abc.pl. I think the perl script abc.pl use
the path veriable on the shell not where abc.pl sites. Because I want my
script to be portable, so I don't wnat to change the relative path within
abc.pl, so how do I tell abc.pl to set default path?
Anoher problem is that I run several scripts at once, and I put them in a
..sh file as
perl 111.pl
perl 222.pl
perl 333.pl
and I made the .sh file chmod 777, but when I type the file name RUN.sh, it
still tells me "command not found". I am not sure it is a shell problem or I
set up something wrong here.