Perl Test Problem - show-shebang 
Author Message
 Perl Test Problem - show-shebang

I've had an ongoing issue with a solaris 7 host that won't run a simple
perl script that will work on other solaris 7 boxes without modification
and without problem.

Basically it appears as if the box does not interpret the file as a perl
script and gives me shell
errors when I try to execute it.  Doing a file on the script gives me
the following
/export/home/root/scripts/mail.access:  executable /usr/local/bin/perl
script

-rwxr-xr-x   1 root     other         651 Jun 21 08:16
/export/home/root/scripts/mail.access

When I try to execute the program it gives the following errors:
/export/home/root/scripts/mail.access: =
#######################
##
## to rebuld the database sendmail uses in conjunction with this file
issue the command below
##
## makemap -v dbm /etc/mail/access < /etc/mail/access
##
#######################
: No such file or directory
/export/home/root/scripts/mail.access: line 13: syntax error near
unexpected token `(F,">/etc/mail/access")'
/export/home/root/scripts/mail.access: line 13: `open
(F,">/etc/mail/access")||die "cant open /etc/mail/access!!!\n";'

Basically it appears that these are shell errors, but why am I getting
shell errors is the problem?
The script is partially as follows

#!/usr/local/bin/perl

$header="
#######################
##
## to rebuld the database sendmail uses in conjunction with this file
issue the$
##
## makemap -v dbm /etc/mail/access < /etc/mail/access
##
#######################
";

open (F,">/etc/mail/access")||die "cant open /etc/mail/access!!!\n";

print F $header;

My thoughts were that for some reason perl wasn't interpreting the
shebang properly (#!) because the path is proper to perl, however, the
shell is executing it for some reason (I'm using bash on solaris 7).  To
further complicate matters if I specify the entire perl path and program
the script runs fine.
such that /usr/local/bin/perl /export/home/root/scripts/mail.access runs
just fine.

However, when I try to recompile perl I get the following error during
the test phase and I was wondering if this may be part of my problem.
op/magic............ok 22/35Dying on warning: Can't exec
"./show-shebang": No such file or directory at op/magic.t line
168.
op/magic............FAILED test
23                                          

Has anyone ever experienced this problem???  The perl version is
perl5.6.1.

I'd appreciate any insights.  I've been battling this for days and I've
already taken it to the comp.unix.shell, solaris, and misc newsgroups.
I'm hoping someone here may have some insight.

Thanks,
Brian Seppanen



Mon, 08 Dec 2003 23:30:35 GMT  
 Perl Test Problem - show-shebang

Quote:

> I've had an ongoing issue with a solaris 7 host that won't run a simple
> perl script that will work on other solaris 7 boxes without modification
> and without problem.

> Basically it appears as if the box does not interpret the file as a perl
> script and gives me shell
> errors when I try to execute it.

The perlrun man page gives some options that may be applicable to your
situation.

John
--
use Perl;
program
fulfillment



Tue, 09 Dec 2003 03:50:30 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Perl 4.036 regression test shows bug in SunOS 4.1.1 tmpfs

2. Test Shows 99.99% of High School Seniors Can't Read Perl

3. Problems with MSIE in combination with MAC not showing Perl generated HTML

4. shebang question for Win32 Perl/Apache

5. Shebang line -- What exactly does Perl do?

6. problem with db tests with make test

7. File showing problem

8. Parse::RecDescent problem, $::RD_TRACE showing something very odd.

9. show() problem!!

10. LabEntry problem - label not showing in 5.5.3

11. Problem to show a progress bar working

12. Shebang line through MS DOS?

 

 
Powered by phpBB® Forum Software