From owner-freebsd-questions Sat Aug 2 23:13:35 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA07204 for questions-outgoing; Sat, 2 Aug 1997 23:13:35 -0700 (PDT) Received: from andrsn.stanford.edu (root@andrsn.Stanford.EDU [36.33.0.163]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA07199 for ; Sat, 2 Aug 1997 23:13:33 -0700 (PDT) Received: from localhost (andrsn@localhost.stanford.edu [127.0.0.1]) by andrsn.stanford.edu (8.8.5/8.6.12) with SMTP id XAA04117 for ; Sat, 2 Aug 1997 23:13:32 -0700 (PDT) Date: Sat, 2 Aug 1997 23:13:32 -0700 (PDT) From: Annelise Anderson Reply-To: Annelise Anderson To: freebsd-questions@freebsd.org Subject: cops/perl problem Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I installed cops (on 2.2.2-S) and decided to run the perl version. Here are the opening lines of the perl script cops: #!/bin/sh -- need to mention perl here to avoid recursion 'true' || eval 'exec perl -S $0 $argv:q'; eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' & eval 'exec /usr/local/bin/perl -S $0 $argv:q' if 0; I got an error message: can't open need. So I commented out what looked like a comment. Then I got an error message about -S being an invalid option. So I commented out the whole block and used #!/usr/local/bin/perl instead. Then it complained about precedence problems with the following lines, wanting parens around CONFIG, FILE1, and FILE2. (Roughly lines 86, 222, and 223.) So I provided parens.... open CONFIG || die "can't open $CONFIG: $!"; open FILE1 || die "can't open $FILE1: $!\n"; open FILE2 || die "can't open $FILE2: $!\n"; and it ran fine, complaining only that the "andrsn" in the specification of the USER to receive mail (root@andrsn.stanford.edu) in the config file needed to be escaped. :) (Of course it also complained about the number of fields in the password and group files and other stuff, but that's what it's supposed to do.) Maybe it would have been okay with perl 4, from /usr/bin....or was I doing something wrong? Annelise