At 10:54 -0400 2001-04-29, Chris Nandor wrote:
>At the beginning of an MPW perl script, I have:
>
> Perl -Sx "{0}" {"Parameters"}; Exit {Status}
>
>However, if I try to run that script with:
>
> Perl scriptname
>
>then Perl complains. Any thoughts on what to do about it? Is there a way
>to make a script work when called by its own name AND when called by perl?
With a trick: save an empty text file under the name 'q' in your path.
Then you can start your MPW Perl scripts with
q|
Perl -Sx "{0}" {"Parameters"}; Exit {Status}
|;
To MPW, the 'q' looks like the empty command; to Perl it's just a string
that gets discarded.
Gero Herrmann
Niigata, Japan