Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!hplabs!pyramid!sword.pyramid.com!mfrost From: mfrost@sword.pyramid.com (Mark Frost) Newsgroups: comp.lang.perl Subject: Strange file-opening problem with perl 3.0@44 Message-ID: <142743@pyramid.pyramid.com> Date: 29 Jan 91 00:51:57 GMT Sender: news@pyramid.pyramid.com Organization: Pyramid Technology Corporation, Mountain View Lines: 43 I had written a script to manage some configuration files. This script opened and read data from a set of configuration files. It worked fine at patchlevel 41. But then........ came patchlevel 44. The script seems to work fine now, except that at one particular point in the file, it fails to open one particular file. The file-exists and is world readable. If I put perl v41 back into place, the file works fine. I have single-stepped through and found that it indeed misses the loop. Here's the hunk o' code. # Figure out what host this script is being run on $thishost = &gethostname; # Set host-specific configfile name # Config file name is $thishost + ".config" $hostconfigfile = "configs/". $thishost . ".config"; open(HOSTFILE, "$hostconfigfile" || die "Can't open $hostconfigfile\n"); while () { } # while close(HOSTFILE); It never enters the while loop. I read a bunch of other files in this same manner, but it's always this one file that fails (and only under v 44). Perhaps this is also a good place to mention that the "die" command given above NEVER works. I believe I got this expression from the man page (a recommended command for opening files). Whether the file is there or not, the die will never execute (this is not just under v 44, either). I still put them in there hoping that one day, just maybe... Any idears about what might be going on? -m----------- Mark Frost (mfrost@pyramid.com) ---mmm--------- System Administrator - Hardware Engineering -----mmmmm------- Pyramid Technology Corporation -------mmmmmmm----- 1295 Charleston Rd, P.O. Box 7295 ---------mmmmmmmmm--- Mountain View, California 94039-7295 -----------mmmmmmmmmmm- (415) 335-8163