YIKES! My bad! The ". " is also used to instruct the shell that it should run the commands in the file under the same process id, and NOT fork/spawn/exec a new process to run it. And to include the new "/opt" as a permanent entry in Liming's $PATH, he would still need to type the dot-space, otherwise the set will have an effect only on the process running the set command. (Not very useful) The ./ is the thing that fires up the script from the current directory... Sorry. It's been a while. At 13:37 -0700 08/23/2002, Sean Willard wrote: >Bill Becker writes: >> At 21:45 +0200 08/23/2002, Detlef Lindenthal wrote: >> > >> >A statement >> > . test.pl >> >means: The lines of the file "test.pl" >> >are interpreted as UNIX statements. >> >But UNIX won't understand Perl statements. >> > >> >> Yes it will, because the first line of his script is the >> hash-bang/path of the perl interpreter. >> >> In general, this will work with nearly any unix. Even the OS/390 USS >> understands it. > >Solaris 8 and bash certainly don't. I think you mean > > ./test.pl > >For Bourne shell derivatives, ". " means "interpret the >following file as containing shell commands". The hash-bang >line is treated as a comment and ignored. The C-shell >derivative equivalent is "source <file>". In all shells, >"./test.pl" or "/opt/test.pl" means "run this executable" -- >whether it's a Perl script, compiled object file, or what have >you. > >Liming, you should be able to do either of these (assuming your >test.pl is in the directory /opt): > > cd /opt > ./test.pl > >or > > /opt/test.pl > >SeanThread Previous | Thread Next