how to read file from sub-directories and do an average?

E

Eric Schwartz

Tad McClellan said:
There is no need for a temporary array:

foreach $inputdirname (sort readdir WORKINGDIR) {

No, but I have found that unless memory usage is a specific
optimization goal, temporary variables help tremendously in debugging,
and I will often use them even if they are not strictly required. I
could easly insert a

{
local $" = ', ';
print STDERR "inputdirs: [@inputdirname]\n";
}

block if I don't seem to be getting what I want to, or if I'm using
the debugger (mad props to Devel::ptkdb!), set a breakpoint after the
readdir() call.

-=Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top