Date: Wed, 29 Dec 1999 08:50:29 -0500 (EST) From: Will Andrews <andrews@TECHNOLOGIST.COM> To: Arjan van der Oest <arjan@nl.demon.net> Cc: freebsd-isp@FreeBSD.ORG Subject: RE: FreeBSD and Perl Message-ID: <XFMail.991229085029.andrews@TECHNOLOGIST.COM> In-Reply-To: <Pine.BSF.4.10.9912291144350.72353-100000@bunker.noc.nl.demon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <andrews@technologist.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.991229085029.andrews>