Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2001 02:12:35 -0500
From:      "Chris Dritsas" <chrisquestions@hotmail.com>
To:        freebsd-questions@freebsd.org
Subject:   RE: Perl #! syntax support
Message-ID:  <F106PGxgelXDeqoMIOG00010299@hotmail.com>

next in thread | raw e-mail | index | archive | help
Thanks,

Works with '$ ./myprog.pl' anyway of making it work with just the file name? 
....   '$myprog.pl'  ....


>From: Don Read <dread@texas.net>
>To: Chris Dritsas <chrisquestions@hotmail.com>
>CC: freebsd-questions@FreeBSD.ORG
>Subject: RE: Perl #! syntax support
>Date: Fri, 14 Sep 2001 02:02:22 -0500 (CDT)
>
>
>On 14-Sep-2001 Chris Dritsas wrote:
> > Good Day,
> >
> > I am writing some perl and dont want to issue 'perl <filename>' at the
> > command prompt every time I wish to run my script.
> >
> > Reading Wall and Schwartz 'Progamming Perl', I find mention to my issue; 
>"On
> > systems that support the #! syntax for specifying the name of an
> > interpreter, you can put a magical line at the front of the file so that 
>the
> > operating system knows what program to interpret your file with, like 
>this:
> >#!/usr/bin/perl"
> >
> > My system seems to not be supporting this syntax '#!'. My scripts run 
>fine
> > when I issue 'perl <filename>' at the command prompt.
> >
> > Any ideas how to make my system support this syntax?
> >
>
>put shebang on the first line:
>#!/usr/bin/perl -w
>
>  ...
>
>Add execute permission:
>$ chmod +x myprog.pl
>
>then run it:
>$ ./myprog.pl
>
>
>Regards,
>--
>Don Read                                       dread@texas.net
>-- It's always darkest before the dawn. So if you are going to
>    steal the neighbor's newspaper, that's the time to do it.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F106PGxgelXDeqoMIOG00010299>