Originally Posted by hamidi2
1. first, let me know where's the best place to put my own general utilities. i don't want it to be /bin, because it's not separated from the system binary files. it's like putting my own utilities in System32 in Windows.
2 locations come to mind: /usr/local/bin
The first is global and keeps none-system related binaries away from /(s)bin and /usr/(s)bin. The second is a bin directory inside the home directory, which would make it local for the owner of that home directory ("you").
There are other options, but these are commonly used.
2. what's the best method to add my own directory to path? i want it to happen only in my account for my user. maybe put some commands in .bashrc?
The PATH variable holds all the directories that are searched, you can add a directory to this variable. It depends a bit on the distribution you are using, but .bashrc can be used. Add something like this at the end of .bashrc:
3. now how can i omit the requirement to affirm the .pl extension, so that i just enter the name (not with extension) of the perl script when running it?
i'm not 100% sure I understand what it is you want or if you are looking for the correct solution.
Windows is extension based, it looks at (needs) an extension to be able to find out what kind of file is being used. Linux on the other hand does not look at the extension.
If a script has the correct hash-bang, linux will execute/parse this accordingly, no matter what the file name is.
use strict ;
use warnings ;
If the above perl snippet is saved as some.name
it will be executed using perl. If the file would be called some.name.awk
it would still be executed using perl.