Thanks, John.  That did it.
--Marilyn

On Oct 29, 2005, at 10:11 PM, John W. Krahn wrote:

Marilyn Sander wrote:

thank you very much for the trouble you have taken with your answer.
I acknowlege that our script
is not the same as the example in "Programming Perl".  We really need
to have the leading bash code there to choose what directory to execute
Perl from.  My question is still, is there a way to have that leading
bash code and still have emacs see the file as a Perl script.

I agree the documentation you've quoted does not say that it's
possible.  I just thought that the example in "Programming Perl"
suggested there ought to be a way to do it.  I've been guessing
and trying different combinations, since there is no explicit
rule or example.    If I try
    #!/bin/bash -- # -*- perl -*- -x

Perl gives the error message
    Can't emulate -x on #! line.

The documentation you've quoted does not say explicitly that it's
possible to construct this sort of script and have emacs recognize it.
Perhaps it isn't.  Do you know whether it is possible, and if so,
how to do it?

Please note, I am not an emacs user.  The emacs user in question
doesn't know how to do this, either.

I am not an emacs user either but I would assume from reading the docs that
you could do something like this:

#!/bin/bash

# shell code here

exec $perl -x $0 ${1+"$@"}

#! -*- perl -*- -w

# perl code here

__END__

something else here



John
--
use Perl;
program
fulfillment



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to