Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!cmic!garvey From: garvey@cmic.UUCP (Joe Garvey) Newsgroups: comp.lang.perl Subject: simple script to write a file core dumps, why? Keywords: perl, hpux 6.5, hp 9000/370, help Message-ID: <257@cmic.UUCP> Date: 7 Mar 90 22:15:04 GMT Reply-To: garvey%cmic@mips.com Followup-To: garvey%cmic@mips.com Organization: Califonia Microwave Inc., Sunnyvale, CA. Lines: 44 I've run into a strange problem writing to files with perl 3.0, pl 12. It was compiled with the +O1 and not the -O (which is know to cause problems on HP machines). It sends information to the screen instead of the file, and then core dumps (ie stops dead). The requested file is created, but has 0 bytes. Any ideas? Any ideas on where to look in the perl sources. It passed all its tests ok. I'm still kinda new to perl, have I done something wrong? Exhibit A: Offending perl script. #!/usr/contrib/bin/perl $header[0] = "sometimes you feel like a nut"; $header[1] = "sometimes you don't"; open(wow, ">zzz"); for($i = 0; $i <= $#header; $i++) { printf("%s\n", $header[$i]); #this goes to the screen printf(, "%s\n", $header[$i]); #this goes to the screen, too } #end_for close (); exit 0; Exhibit B: output of perl -v (less copyright, etc) $Header: perly.c,v 3.0.1.4 90/02/28 18:06:41 lwall Locked $ Patch level: 12 --- Joe Garvey UUCP: {apple,backbone}!versatc!mips!cmic!garvey California Microwave Internet: garvey%cmic@mips.com 990 Almanor Ave HP Desk: garvey (cmic@mips.com) /hp1900/ux Sunnyvale, Ca, 94086 800-831-3104 (outside CA) 408-720-6439 (let it ring) 800-824-7814 (inside CA)