in reply to opening a port

Is this question Perl related (I mean do you want to code a kind of file server in perl ?)
Or do you want to share your hard disk or set up a ftp servers (or hotline server or whatever...) ?
In either way you have to be more precise...

To answer strictly to your answer : to open a port and listen, check IO::Socket doc.

UPDATE : As always I'v typed too slowly and 2 answers were post (making mine redundant) while I was typing, as always ignore this post, or better vote it for deletion (nodereaper)