in reply to assosiating .pl files with perl on linux

Making any file under Linux executable is a two-fold process:

  1. First, you need to mark the file as executable by setting it's "executable" bit. You seem to have done that, as you see some errors.
  2. Second, for text files to be executable, you must make the first line of the script point to the interpreter it is to be executed with. You don't seem to have that, as you get some errors about commands not being found. Try the below script as a starting point.
#!/usr/bin/perl -w use strict; print "Hello World from Perl\n";

The first line ("hashbang line", due to the first to characters in it) must point to where perl is located on your machine.

Replies are listed 'Best First'.
Re: Re: assosiating .pl files with perl on linux
by edan (Curate) on Apr 29, 2004 at 08:34 UTC

      I hate to be pedantic, but that is more commonly called the 'shebang' line, not 'hashbang'.
      If you find something in the Jargon file, that means that most likely no one really talks that way.

      I think 'hashbang' is pretty common, though 'shebang' is still heard occasionally.

        Hogwash!