I just want to write some perl scripts for some simple operations. This should be more than a little easy on OS, which is based on Unix.
Apple goes to a lot of trouble to hide the Unix complexities from its typical consumer base. One of the things they really want to keep the typical consumer away from are the directories involved in running the operating system.
I drafted a script in a plain text editor and attempted to save it to an appropriate place on the PATH. The editor couldn't find it (/usr/local/bin).
Most GUI editors will not find the Unix specific directories. As someone else has pointed out, they are marked hidden. Again this is so that the typical Apple consumer customer will not mess with them.
There are GUI text editors that will ignore the hidden flag, such as TextWrangler (free download)
<http://www.versiontracker.com/dyn/moreinfo/macosx/18529>
I ls -l's /usr/local - bin exists, but I do not have write permissions there - only "wheel" does. What's with this?
Wheel is also know as the "Big Wheel", the "Big Cheese", "Top Banana", etc... On my system /usr/local/bin is owned by root with /usr/local/bin being in the group wheel. However, on my system ONLY root can write into /usr/local/bin.
/usr/local/bin is meant for loca (i.e. my, rather than system) use.
Going back to traditional Unix, where there were lots of users sharing a system, /usr/local/bin was where the local adminstrator would store executables for all local users to use that would not polute the official Unix distribution executables. But, /usr/local/bin still required root privilege before you could write into it, otherwise anyone could mess with those files, and install a malicous program.
The convention was that users would create a $HOME/bin where they would put their personal scripts and programs. They would also add $HOME/bin to the PATH environment variable in their shell initialization file (bash would be .bash_profile).
And anyway, why is it invisible. Can't find it with Finder.
As mentioned earlier Apple does its very best to hide the Unix underside. They are selling an easy to use GUI based operating system, not Unix. Also, throw enough users without Unix experience, and statistically, enough of them will delete essential files in /bin, /sbin, /usr, /etc/, etc... so that they would destroy their system without knowing it, and then Apple would get a phone call. It is easier to hide those files, as most GUI oriented users do not need them, and use the Unix file protections to place another road block between typical users and destruction.
There is an option you can change that will cause the Finder to see all files.
defaults write com.apple.Finder AppleShowAllFiles TRUE
Now restart the Finder
killall Finder
Change TRUE to FALSE and the Finder will stop showing hidden files.