in reply to socket help
Sorry! Posted in curiosity. But, now I've found.
It is because of
Need to do like this.print <$fh>;
$var = <fh>; print $var;
When we do something like 'print <fh>' it reads till EOF and prints entire content. Since, I've tried in sockets, I wouldn't have received EOF. So, the above code didn't work as expected.
In Section
Seekers of Perl Wisdom