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

One way would be to do something like this:

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

-- Ken

Replies are listed 'Best First'.
Re^2: @addrs = (gethostbyname('www.yahoo.com'))[4..-1] ?
by ikegami (Patriarch) on Nov 04, 2010 at 00:13 UTC
    ow! Don't use that in a sub or a loop!

      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