Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Mar 1998 23:58:44 -0800
From:      tim@v-com.com
To:        freebsd-questions@FreeBSD.ORG
Subject:   perl: scripts to commands...weird
Message-ID:  <2.2.32.19980305075844.006cffc0@v-com.com>

next in thread | raw e-mail | index | archive | help
Doing some playing around on my own I discovered a few oddities in the
process of getting my perl scripts to be command line executable.

1. the usual "#!/path_to_my_perl_binary/perl" must be the first line...duh.
2. gotta "chmod +x myperlscript.pl", yup.

now here's the weird stuff...

3. I have to move it into one of the bin directories that is in my shell
path. (I'm using csh as default)
4. I have to launch another shell or log out and log back in to my current
one for it all to take effect.

I tested it. If I move it out of the bin directory I can not execute it
anymore. If I move it into different bin directory, still being one that I
have in my profile path, it won't work. Not until I start another shell or
log out/in.

I can understand some of this limitation as I'm telling my shell to only
look in certain directories and those in a certain order as well, but what I
don't understand is why I have to play this musical shell game to get it to go.

Can anybody enlighten?

Thanks, Tim


======================================================================
Timothy T. Smith 		V Communications Inc.
				2290 North First Street 
SysAdmin 			suite #101
MIS Dept.			San Jose CA 95131
				main:(408)-965-4000
tim@v-com.com			fax:(408)-965-4014

"Computers don't make mistakes. What they do, they do on purpose." 
						- Dale (King of the Hill).
=======================================================================



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2.2.32.19980305075844.006cffc0>