foreach my $uitem (sort @uphosts) { # sort is for cleanliness... print li("$uitem\n"),br; }
I prefer to use map over foreach when possible:
print join br, map li $_, sort @uphosts;
But maybe that's just because I like writing LISP in Perl :)
"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.
In reply to Re^3: improving the aesthetics of perl code
by hardburn
in thread improving the aesthetics of perl code
by tcf03
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |