SLUG Mailing List Archives
Re: [SLUG] Execute a file
- To: Sydney Linux Users Group <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] Execute a file
- From: Ken Yap <ken@xxxxxxxxxx>
- Date: Wed Sep 27 13:55:31 2000
- Reply-to: ken@xxxxxxxxxx (Ken Yap)
>The top line of the file is:
>I found that if I type:
>/usr/bin/perl -P index.pl
>It works perfectly.
>Does anyone have any suggestions as to what I'm doing wrong? It works
>fine on another system I have, simply copied the file across.
man perlrun says that -P causes the script to be run through the C
preprocessor before being executed by perl. So I created a small file
bash$ cat /tmp/date.pl
print __DATE__, "\n";
and got this when I tried to preprocess it:
bash$ gcc -E - < /tmp/date.pl
:1: invalid preprocessing directive name
# 1 ""
print "Sep 27 2000", "\n";
So maybe the preprocessor error is upsetting perl?
Why not preprocess the file before installing?