Re: pl
- From: Dermot Musgrove <dermot glade perl connectfree co uk>
- To: Jean Raymond Chauviere <Jean-Raymond Chauviere cetelem fr>, "gtk-list redhat com" <gtk-list redhat com>
- Subject: Re: pl
- Date: Thu, 18 Nov 1999 21:41:06 +0000
Jean Raymond Chauviere wrote:
>
> Dermot Musgrove wrote:
>
> > Jean Raymond Chauviere wrote:
> > >
> > > I don't believe gnome is the right list to this question but ..
> > Agreed but...
> >
> > > under a unix like operating system, you have to make it executable
> > > with the command
> > > chmod a+x name-file.pl?
> > > and after you can launch it with :
> > > ./name-file.pl?
> > Omit the trailing question mark and it might work but then again it might
> > not. More likely to work is 'perl ./name-file.pl' (without the quotes).
>
> The '?' comes from cut and paste. (see below, the original message)
> To run a script (perl, shell, tcl, ....) you have always 2 methods :
> usually to test you use :
> the_shell the script
> but if you want to mimic a system command, you can turn the script
> executable with the chmod command.
Using bash, it should work if the first line of the perl script is
#!/path/to/perl -perl_switches
but otherwise you'll get 'name-file.pl: print: command not found' for the
first perl command (print for instance) that bash doesn't recognise.
> I work under UNIX since 1981 and I don't believe that, even under linux,
> someone changes it.
> If you have a problem with one or an other method, you musn't accuse the
> method.
I will accuse the method if it is sometimes wrong and it might mislead a
beginner.
> >
> >
> > But best is to read the perl documentation 'man perl' and follow
> > pointers.
>
> This has nothing to do with perl, the way you can use scripts for a given
> interpreter is system dependant
You should have said so in your first email, your suggestion will not
always work with bash.
BTW which shells can execute such a script without the first identifying
line?
Dermot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]