When trying to connect some network device using Perl you have a number of choices.
See the full stack of HTTP connections:
- Socket, and the socket function.
- IO::Socket::INET using IO::Socket
- Net::Telnet, Net::FTP, Net::SSH (wrapping ssh), Net::SSH::Perl, Net::*
- LWP::Simple, LWP
- WWW::Gittip (scaping or talking to an API)
At the lowest level you can use the built in socket function. Using the Socket library provides several extra functions and constants that will make your code cleaner and more portable. See also perlipc