Perl Script - Sending files on a particular port

I've written some basic programs in Perl, but unwaware abut socket programming in Perl.

I need to write a file called syslog, onto port 514 of another host from port 514 of my machine. Is this possible in Perl? Which modules are to be used?

Regards,
Rahul.

Of course yes. To avoid duplicating what you will find from the man pages, I will refer you to there:

http://perldoc.perl.org/perlipc.html\#Sockets%3A-Client%2FServer-Communication

If you have programmed Socket in C before, that's highly similar.

An alternative object-oriented API is available through some core modules shipped with Perl, i.e. IO::Socket. It's mostly a wrapper of the core socket procedural API, for those wishing to go a more OO way. Both are introduced in the page quoted above.