Hi,
Please check this
link
Update:-
Since
IO::Socket which is explained clearly and more in detail here in the above mentioned link i have used pm search and gave resultant page here. I think this will give u some idea to solve ur issues.
-prasanna.k