in reply to Re^2: @addrs = (gethostbyname('www.yahoo.com'))[4..-1] ?
in thread @addrs = (gethostbyname('www.yahoo.com'))[4..-1] ?

I don't understand how. I guess I have no idea what is an "intermediate variable"
  • Comment on Re^3: @addrs = (gethostbyname('www.yahoo.com'))[4..-1] ?

Replies are listed 'Best First'.
Re^4: @addrs = (gethostbyname('www.yahoo.com'))[4..-1] ?
by ikegami (Patriarch) on Nov 04, 2010 at 03:02 UTC
    The new gethostbyname copies the values from gethostbyname into an array. addr_list returns that array variable. It's what's being dereferenced (@{}). (Only one of the 4 solutions I posted copy the returned values.)