in reply to Use of uninitialized value warning on print

Chances are that the ports you want getservbyport to look up are not listed in your services file. (Sounds to me like you are testing this on Windows as most versions of Windows have a stripped down services file.)

  • Comment on Re: Use of uninitialized value warning on print