[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Processes bug?



I'm getting corrupted output files when I scan the %Process hash. The
following script is the smallest I could devise that exhibits the problem.
I'm new to Perl, so I'm  not sure if this a bug in Processes, or if I'm
doing something wrong.  When I put print statements in the while loops
I see the expected list of processes. "Output" is OK if either iteration
over %Process is removed.  I'm using MacPerl 5.1.4a1.


Maybe this is a related problem: In the debugger, the command 'x %Process'
crashes the debugger at line 138 of dumpvar.pl.


#!usr/bin/perl
use Mac::Processes;
open(OUT, ">:Output") || die "can't open file\n";
while (($psn, $pi) = each %Process) {
}
print OUT "Hello World\n";
#exit;
# ---- Here file "Output" is OK
while (($psn, $pi) = each %Process) {
}
# ---- Here file "Output" is corrupted




***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch