in reply to flushing by default
You don't seem to check if open() was successful. Use the common idiom open HANDLE,'>','file' or die "file: $!";. You also don't seem to check the return value of print() for success. And you seem to mix up two error variables: $@ contains the last eval() error, $! contains the last system call error (errno variable in C).
Alexander
|
|---|