# trim whitespace in the scalar, the array,
# and all the values in the hash
foreach ($scalar, @array, @hash{keys %hash}) {
s/^\s+//;
s/\s+$//;
}
|
< Use foreach() Loops Avoid Symbolic References > Table of Contents | Page 21 |
YAPC 19101,
June 2001 Perl Idioms Nathan Torkington |