in reply to Re^2: use: command not found error
in thread use: command not found error

which gets whatever the user would get by typing "perl" at the command line. There may be multiple perl versions in different locations, leading to strange behavior. If /usr/bin/env is not there, there are bigger problems.

Indeed this is often debated, and many think that env suffers from the same problem it aims at solving.

Replies are listed 'Best First'.
Re^4: use: command not found error
by Anonymous Monk on Jun 10, 2009 at 22:02 UTC
    i have the same problem - i want to run the following perl script helloworld.pl #!/usr/bin/perl print "Hello World!\n"; it runs if i type perl helloworld.pl in the command line but, if i try to run the script without calling perl explicitly in the command line (i.e. helloworld), i get "command not found". i'm absolutely sure that i'm running the program from the correct path and that perl is located in /usr/bin/ - i used which perl. what's going on guys?