A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.
Don't parse the output of "ls".
Instead:
for file in *do ...done
for file in *
do
...
done
(source)