in reply to socket mail : convert php to perl

it is so simple. how to translate it to perl?

What part are you having trouble with? How far have you gotten on the translation?

You might find Mail::Send useful in your translation.