In case $data is empty,
unless ( syswrite( $pc, $data ) == length $data ) { # ... }
Or maybe just
unless ( defined syswrite( $pc, $data ) ) { # ... }
(Should it be considered an error if syswrite writes some number of bytes different from the length of the string you give it?)
In reply to Re^2: capturing syswrite failures
by kyle
in thread capturing syswrite failures
by Brad.Walker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |