From owner-freebsd-isp Wed Dec 29 5:50:37 1999 Delivered-To: freebsd-isp@freebsd.org Received: from pluto.psn.net (pluto.psn.net [207.211.58.12]) by hub.freebsd.org (Postfix) with ESMTP id 8411314FDB for ; Wed, 29 Dec 1999 05:50:33 -0800 (PST) (envelope-from will@shadow.blackdawn.com) Received: from 14-100.008.popsite.net ([209.69.195.100] helo=shadow.blackdawn.com) by pluto.psn.net with esmtp (PSN Internet Service 3.12 #1) id 123JUm-0005aB-00; Wed, 29 Dec 1999 06:50:32 -0700 Received: (from will@localhost) by shadow.blackdawn.com (8.9.3/8.9.3) id IAA74537; Wed, 29 Dec 1999 08:50:29 -0500 (EST) (envelope-from will) Message-ID: X-Mailer: XFMail 1.3.1 [p0] 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: Wed, 29 Dec 1999 08:50:29 -0500 (EST) Reply-To: Will Andrews From: Will Andrews To: Arjan van der Oest Subject: RE: FreeBSD and Perl Cc: freebsd-isp@FreeBSD.ORG Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 29-Dec-99 Arjan van der Oest wrote: > We used to run our webservers on NetBSD but recently changed over to > FreeBSD 3.3r. We've seen a lot of perl scripts break becase they start > with the first line : #!/bin/perl -- -*-perl-*- This looks familiar. I'm pretty sure that "-*-perl-*-" is just an Emacs way of getting syntax highlighting (in addition to some Emacs feaures) for the script as a Perl script. > NetBSD seemed to pass this as a single argument to the interpreter and > perl ignored it. FreeBSD now seems to pass this line as two arguments to > the interpreter, braking the script because it tries to open script > -*-perl-*-. You can probably comment this "-*-perl-*-" out on a line below #!/usr/bin/perl (not #!/bin/perl since Perl is installed in /usr by default on FreeBSD). Like this: #!/usr/bin/perl -w # -*-perl-*- # [...code...] Or, at your leisure, you can delete the string entirely. Note that I've replaced "--" with "-w". See perl(1) manpage. "--" is, if I am not mistaken, intended to be used with a file.. > Besides the fact that I see no use of inserting "-- -*-perl-*-" in the > scripts, does anyone recognises this problem ? How did you deal with this? > We've got a lot of customers who use standard scripts and this line > appears in a lot of examples/books/pre-written script, thus causing lots > of people calling tech support. I'm afraid that the original programmer likes Emacs. ;) I stop here at the risk of triggering a holy war. *grin* -- Will Andrews GCS/E/S @d- s+:+>+:- a--->+++ C++ UB++++ P+ L- E--- W+++ !N !o ?K w--- ?O M+ V-- PS+ PE++ Y+ PGP+>+++ t++ 5 X++ R+ tv+ b++>++++ DI+++ D+ G++>+++ e->++++ h! r-->+++ y? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message