in reply to Trouble with getprotobyname

I think what you're looking for is getservbyname instead of getprotobyname. For example, you may have something like this:
my($server_port) = getservbyname('talk','tcp');
Hope that helps!
--shendal