From owner-freebsd-questions Fri Sep 14 0: 2:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mw3.texas.net (mw3.texas.net [206.127.30.13]) by hub.freebsd.org (Postfix) with ESMTP id 378D737B408 for ; Fri, 14 Sep 2001 00:02:28 -0700 (PDT) Received: from localhost.texas.net (tcnet33-044.austin.texas.net [209.99.102.233]) by mw3.texas.net (8.11.6/8.11.6) with ESMTP id f8E72ML06933; Fri, 14 Sep 2001 02:02:22 -0500 (CDT) Message-ID: X-Mailer: XFMail 1.5.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Fri, 14 Sep 2001 02:02:22 -0500 (CDT) From: Don Read To: Chris Dritsas Subject: RE: Perl #! syntax support Cc: freebsd-questions@FreeBSD.ORG Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 14-Sep-2001 Chris Dritsas wrote: > Good Day, > > I am writing some perl and dont want to issue 'perl ' 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 ' 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message