Mark Alldritt wrote in perl.macosx : > > I'm seeing a crash reading $| in the following code snippet: > > local *STDOUT; > > my $copy = $|; # <-- crashes here....
This bug will be fixed in 5.9.0 and eventually in 5.8.1 if it's picked up for the next release candidate. > I'm reading $| in some code that does not know if local *STDOUT has happened > or not. Can anyone think of a way to work around this? Test for fileno(STDOUT) to see whether it's been undefined. On my linux : $ cat x #!perl -l print STDERR "-",fileno(STDOUT),"-"; local *STDOUT; print STDERR "-",fileno(STDOUT),"-"; $ perl x -1- -- HTH. -- Ulcers is not *NIX