in reply to Re^2: Execute a Perl code without ".pl" extension
in thread Execute a Perl code without ".pl" extension

Fair enough, but even though *nix doesn't care what the file is named, the OP wanted to know how to do

$ ./myperlcode param > someoutput.txt

and the original script was named myperlcode.pl.

Replies are listed 'Best First'.
Re^4: Execute a Perl code without ".pl" extension
by Moriarty (Abbot) on Mar 10, 2006 at 02:53 UTC

    My personal preference is to leave to ".pl" in place as it tells me that I can edit it as a normal Perl script.

      At least where I'm sitting, "executables" are sometimes compiled, sometimes perl scripts, sometimes shell scripts...you get the idea. I use the "file" command to tell me what's what. And hey...file uses magic...really. The file that stores the heuristics that it uses for guessing is /etc/magic. :)

      thor

      The only easy day was yesterday