Hello Mahesh,

Quoting [EMAIL PROTECTED]:

Hello
I am using RHEL 4 (full Install) and created a simple perl script with 'perl filename' the command is working correctly but when I run the script ./script I get bad interpreter error

[EMAIL PROTECTED] Test]# pwd
/var/www/html/Test
[EMAIL PROTECTED] Test]# perl tryPerl2.pl
this content is from perl file !
[EMAIL PROTECTED] Test]#
[EMAIL PROTECTED] Test]# which perl
/usr/bin/perl
[EMAIL PROTECTED] Test]#
[EMAIL PROTECTED] Test]# cat tryPerl2.pl
#!/usr/bin/perl
print "this content is from perl file !\n";
[EMAIL PROTECTED] Test]#
[EMAIL PROTECTED] Test]# ./tryPerl2.pl
: bad interpreter: No such file or directory
[EMAIL PROTECTED] Test]#

did you try chmod 755 tryPerl2.pl ?
also do this on first line
#!/usr/bin/perl -W

So I cant browse this file from my internet browser    So whats the problem

For displaying in browser you might have to add this before anything gets printed on browser :

print "Content-type:text/html\n\n";

Thanks in advance
With warm regards
MAHESH DESHPANDE

Thanks & Regards,
Mitul Limbani,
Founder & CEO,
Enterux Solutions,
The Enterprise Linux Company (TM),
www.enterux.com

--
http://mm.glug-bom.org/mailman/listinfo/linuxers

Reply via email to