I don't see hwhat the code you have posted has to do with your question. I'd write something along the lines of
use autodie; for my $dir (qw/d1 d2 d3 d4 d5/) { open my $LIST, '<', "$dir/list.txt"; # read from $LIST and do something with it close $LIST; }
In reply to Re: Reading the same file from all the subdirectories
by moritz
in thread Reading the same file from all the subdirectories
by zing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |