If you're just going to stick things in another hash when you get it back it makes much more sense to return a list of the three values (or even two, the name and an arrayref).
Of course in this particular case the more sensible thing would to be to use getservbyname rather than rolling your own and possibly encountering problems on hosts which are using NIS/YP . . .
In reply to Re: returning values from a sub
by Fletch
in thread returning values from a sub
by tcf03
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |