in reply to How Can I use a socket like telnet?

Use Net::Telnet

From the doc:
use Net::Telnet (); $t = new Net::Telnet (Timeout => 10, Prompt => '/bash\$ $/'); $t->open("sms.server.inter.net"); $t->login($username, $passwd); @lines = $t->cmd("sms.pl-msg=$opt{msg} -num=123456789"); print @lines;

Bye!