in reply to $! and $@ peculiarities

This description is almost completely incomprehensible. Why not reduce the server side to a simple standalone piece of test code that just writes the data to a file rather than a client; then if the problem persists, you can post the code here and we can examine it.

$@ is just a global variable who's value is set after an eval is executed, and $! is a funny dual-valued variable (both integer and string) who's value is meaningful at the point of return from a Perl system function which has indicated failure, and who's documentation implies that it sets $! on failure. At any other points during code execution, its value is meaningless.