- or download this
opendir DH, $dir_to_process
# Use a lexical ($dir) instead of a bareword global (DH) if possible
- or download this
if ($file =~ /\.txt$/)
# This would break for a directory called dir.txt - see perldoc -f -X
- or download this
%stuff_to_store = ($dir_to_process, $file);
# This overwrites the hash entirely every time
- or download this
while (%stuff_to_store) {
# this will be an infinite loop if the hash contains any items