How do I fix "bash: perl command not found"?


Maybe it's dumbest question in the world, but I seriously have problems with it and could use help. I am trying to run perl script on linux. It's a simple text editing script, nothing fancy. I googled for it and I found that I had to chmod +x it and then just run in the console. Since it's supposed to modify a text file I did > myfile.txt after chmoding it

But it doesn't work. I get: bash: perl command not found

11/26/2009 7:10:13 PM

Unless is in your path you will need to specify the current directory.

$ ./

You can check if the current directory is in your path with $ echo $PATH. If you're frequently using this script you can put it in the path by moving it to a directory that's part of your path, usually ~/bin.

Or by adding the current directory to the $PATH environment variable. Check the documentation for your shell for instructions.

11/25/2009 9:53:57 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow