good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: How do I read all the file names of a directory into an array?by eg (Friar) |
on Dec 10, 2000 at 13:37 UTC ( [id://45933]=note: print w/replies, xml ) | Need Help?? |
Use backticks (`) to execute a shell command and capture its output (see the perlop manpage):
This would replace everything after the line "use strict;" and before "$error = ...". Note you can also replace your for-loop with a foreach which would mean you wouldn't need $total any longer. See perlsyn.
In Section
Seekers of Perl Wisdom
|
|