-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At 10:31 AM +0100 1/28/98, Angus McIntyre wrote: } The following sample script shows the effect, at least on my system: } } open(SAVEOUT,">&STDOUT"); } open(STDOUT,">JunkFile.txt") || } die "can't open 'JunkFile.txt' for output: $!"; } print "Hello world to STDOUT!\n"; } print STDERR "Hello world to STDERR!\n"; } close(STDOUT); } open(STDOUT,">&SAVEOUT"); } } If you run it repeatedly (without restarting MacPerl), you should notice } that on certain runs, nothing gets written to the console. Instead, both } output statements go to the file. On my system, this typically happens } every third run of the script. Taking out the "close()" statement seems to } cure the problem, but I'm uncertain how durable or complete a solution this } is (will re-opening a stream reliably cause previous output written to that } stream to be flushed, or do I risk losing stuff?). } A Reproducable here. MacPerl 5.1.8 appl, System 8.1, Performa 6400/180. It behaves just as Angus says. On certain runs, but not every run, output goes to the file and not the console. } } -- } angus@pobox.com http://pobox.com/~angus/ } } "Sick and twisted would be the first two words that come to mind," he } said. "But at the same time, it's kind of neat." [Richard Grenier] } - ----- Paul J. Schinder schinder@pobox.com -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBNM8zjlZaVc52j0XhEQJfGQCghjB3kvCtkwteO5r28Z+t0iIm7NwAoMcR 6tkbNts8bfo7rJPt+GduA/5N =wvWc -----END PGP SIGNATURE----- ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch