eval sets $@ when it catches an exception, yet you check $! in the first snippet.
In the second snippet, you're relying on $! being false when there has been no error, but $!'s value is undefined (which is not to say that $! is undef) in that circumstance.
In reply to Re^2: No data received on client socket
by ikegami
in thread No data received on client socket
by rbi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |