From owner-freebsd-questions Wed Dec 17 15:05:24 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA24111 for questions-outgoing; Wed, 17 Dec 1997 15:05:24 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from megaweapon.zigg.com (tcgr-190.dialup.alliance.net [207.74.43.190]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA24093 for ; Wed, 17 Dec 1997 15:05:07 -0800 (PST) (envelope-from matt@megaweapon.zigg.com) Received: from localhost (matt@localhost) by megaweapon.zigg.com (8.8.8/8.8.7) with SMTP id SAA18876 for ; Wed, 17 Dec 1997 18:05:30 -0500 (EST) (envelope-from matt@megaweapon.zigg.com) Date: Wed, 17 Dec 1997 18:05:30 -0500 (EST) From: Matt Behrens To: questions@freebsd.org Subject: perl script trashes master.passwd 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'm trying to write a short perl script to copy passwords from /etc/master.passwd to my CVS repository's password file. When I run this perl script, though, master.passwd ends up as a zero-length file. If I substitute another filename, the script seems to work okay. Is there some weird trapdoor on master.passwd? Matt Behrens | Support the anti-spam amendment! http://www.zigg.com/ | Visit http://www.cauce.org/ #!/usr/bin/perl # Make a CVS passwd file from the system passwd file. $cvsroot="/usr/local/cvs/CVSROOT"; die "can't open master.passwd\n" unless open (SYSPW, "$cvsroot/passwd"); while () { if (/(\S+):(\S+):.+/) { print CVSPW "$1:$2\n"; } }