in reply to Storable.pm - corrupt when saving to non-truncated file

It seems to me it would fail often and reliably if truncate was required.

It is mentioned that (n)store_fd/fd_retrieve can write to a socket, which implies (but does not guarantee) that the format doesn't require EOF to detect the end of the data. And if it it works for *_fd, I would be very surprised if it didn't work for the others.

That's two reasons that make me think that truncating isn't required.

PS - You really should binmode your handle.