develooper Front page | perl.beginners | Postings from February 2002

Re: retrieving info from function

Thread Previous | Thread Next
From:
John W. Krahn
Date:
February 7, 2002 13:49
Subject:
Re: retrieving info from function
Message ID:
3C62F655.522AF221@acm.org
Jesse Ahrens wrote:
> 
> The gethostbyname() function returns 5 variables, the last on addrs is an
> array. How do I specify the function to only return that array rather than
> the 4 strings and 1 array?


(undef,undef,undef,undef,@addrs) = gethostbyname( ... );

# OR

@addrs = (gethostbyname( ... ))[4..9999];


John
-- 
use Perl;
program
fulfillment

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About