in reply to @addrs = (gethostbyname('www.yahoo.com'))[4..-1] ?
Does it count if you don't declare the variables?
my @addrs = sub { @_[4..$#_] }->( gethostbyname('www.yahoo.com') );
my @addrs = sub { splice(@_, 4) }->( gethostbyname('www.yahoo.com') );
Does it count if you only use anonymous variables?
my @addrs = splice(@{[ gethostbyname('www.yahoo.com') ]}, 4);
And one that doesn't use any extra variables.
my @addrs = gethostbyname('www.yahoo.com'); splice(@addrs, 0, 4);
|
|---|