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

ow! Don't use that in a sub or a loop!
  • Comment on Re^2: @addrs = (gethostbyname('www.yahoo.com'))[4..-1] ?

Replies are listed 'Best First'.
Re^3: @addrs = (gethostbyname('www.yahoo.com'))[4..-1] ?
by kcott (Archbishop) on Nov 04, 2010 at 00:17 UTC

    And another way, if you needed to do this in a loop, would be:

    my $i = 0; @addrs = grep { $i++ > 3 } gethostbyname('www.yahoo.com');

    -- Ken