mrsparkle ellem ~/code $ phonetic.pl
bash: phonetic.pl: command not found
mrsparkle ellem ~/code $ sudo chmod +x phonetic.pl
Password:
mrsparkle ellem ~/code $ phonetic.pl
bash: phonetic.pl: command not found
mrsparkle ellem ~/code $ perl phonetic.pl
Enter some letters and numbers: ASF19
alpha
sierra
foxtrot
one
niner
mrsparkle ellem ~/code $
What am I doing wrong? I'd like perl scripts to work without my typing
perl first.
--
Lou Moran
ellem@optonline.net
http://ellem.is-a-geek.org:5280/
http://homepage.mac.com/ellem52/
Dave Gomez - 28 Aug 2003 01:16 GMT
Lou,
try .\phonetic.pl and also make sure the first line contains
#!/usr/bin/perl (or variants which enable strict etc). If the first thing
works, all you need to do is add .\ into your paths within the .bashrc file.
Dave Gomez
> mrsparkle ellem ~/code $ phonetic.pl
> bash: phonetic.pl: command not found
[quoted text clipped - 19 lines]
> http://ellem.is-a-geek.org:5280/
> http://homepage.mac.com/ellem52/
Gene - 28 Aug 2003 02:21 GMT
> mrsparkle ellem ~/code $ phonetic.pl
> bash: phonetic.pl: command not found
[quoted text clipped - 12 lines]
> What am I doing wrong? I'd like perl scripts to work without my
> typing perl first.
phonetic.pl is not in your path. If you try:
./phonetic.pl
it should run.
If you are running the default shell, tcsh, you can add the following
line to ~/.cshrc:
setenv PATH ${PATH}:.
That way the current directory (.) is always in your path.
------------
smalltime industries
www.smalltime.com
Now in 2D!
Ken Williams - 28 Aug 2003 15:17 GMT
Hi Lou,
1) you can run 'chmod' without being root, as long as you own the file
2) if '.' isn't in your path, you'll have to type ./phonetic.pl
3) the "command not found" error may indicate that the "shebang"
(#!/usr/bin/perl) line is wrong - it's good to remember that in the
future because it's a somewhat confusing error message, though
technically accurate.
-Ken
> mrsparkle ellem ~/code $ phonetic.pl
> bash: phonetic.pl: command not found
[quoted text clipped - 19 lines]
> http://ellem.is-a-geek.org:5280/
> http://homepage.mac.com/ellem52/