Shebang not working
- From: Sam CARMALT <scarmalt@xxxxxxxxxxxx>
- Date: Mon, 02 Jan 2006 11:06:28 +0100
I'm having trouble launching a Perl script with the shebang operator.
OS is SuSE 9.2 Professional. So far, I haven't had any helpful
insights at comp.os.linux.suse, and hope this isn't too far from Perl
to post here.
Complete Perl script:
#! /usr/bin/perl
print "Hello, World\n";
This is contained in a file of 3 lines, left-justified, created with
vi. It is saved with a directory entry of
-rwxrwxrwx 1 root root 44 Dec 31 15:32 hworld.pl
In the /usr/bin directory, I find the following entry
-rwxr-wr-w 3 root root 1160321 Oct 2 2004 perl
which leads me to believe that permissions are OK.
Now, here is how things work:
#perl hworld.pl
Hello, World
#hworld.pl
bash: hworld.pl: command not found
#./hworld.pl
bash: ./hworld.pl: /usr/bin/perl: bad interpreter: Permission denied
# ./hworld.pl
bash: ./hworld.pl: /usr/bin/perl: bad interpreter: Permission denied
#. hworld
bash: hworld: No such file or directory
#. hworld.pl
bash: print: command not found
#
>From these I conclude that there is something going wrong with the
shebang line and getting started. Any pointers as to what I need to
change will be appreciated. (Obviously, I need to fix this in order
to use Perl in a CGI environment :)].
Thanks and regards,
Sam
.
- Follow-Ups:
- Re: Shebang not working
- From: axel
- Re: Shebang not working
- From: Abigail
- Re: Shebang not working
- From: Bob
- Re: Shebang not working
- From: Paul Lalli
- Re: Shebang not working
- From: Gunnar Hjalmarsson
- Re: Shebang not working
- From: Mihail
- Re: Shebang not working
- From: Brian Wakem
- Re: Shebang not working
- From: Jari Jokinen
- Re: Shebang not working
- From: Pertti Kosunen
- Re: Shebang not working
- Prev by Date: Re: CGI/sendmail help
- Next by Date: Re: Shebang not working
- Previous by thread: extraction of hostnames in hostfile
- Next by thread: Re: Shebang not working
- Index(es):
Relevant Pages
|