in reply to Yet another Open3 issue . . . or is it?
the sysread always returns 0 bytes, with no warnings or errors.
But you're not checking for errors.
should bemy $bytes = sysread($handle,$buf,1024); if ($bytes == 0) {
my $bytes = sysread($handle,$buf,1024); die "sysread: $!" if !defined($bytes); if ($bytes == 0) {
You imply you have warnings turned on, in which case this won't help since you'd get "Use of uninitialized value in numeric eq (==)" on error.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Yet another Open3 issue . . . or is it?
by Anonymous Monk on Jul 15, 2010 at 18:42 UTC |