in reply to Re: I can't find the IP address!
in thread I can't find the IP address!

Come on now, really.

print "$_ is $ENV{$_}\n" for sort keys %ENV;

1 character less, plus it beats the snot out of using map where it is not needed.


If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, please reply to this node or /msg me to inform me as to what is wrong with the post, so that I may update the node to the best of my ability.

Replies are listed 'Best First'.
Re^3: I can't find the IP address!
by Aristotle (Chancellor) on Jun 22, 2003 at 13:15 UTC
    Why not needed? map isn't called in void context; on the other hand the for variant calls print repeatedly, while the other invokes it only once. </nitpick>

    Makeshifts last the longest.