On Mon, 11 Jun 2001, Bryan Gmyrek wrote:

> How do I set up my Linux system so that I don't need to type:
> $perl programname.pl
> but just
> $programname.pl
> to get the program to run??

You don't need to do anything to Linux, you need to find out where the
perl executable lives (type 'which perl' to get its full path), and then
you need to put this at the top of your Perl program:

#!/path/to/perl

and then make sure your Perl program is executable (chmod +x)

and if that fails, try typing ./programname.pl -- most Unix-based systems
don't have the current directory in the path, so you need to tell the
system you want to execute a program in the current directory by
prepending it with ./

-- Brett
                                   http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Why was I born with such contemporaries?
                -- Oscar Wilde

Reply via email to