in reply to Manipulating Arrays
I don't understand what your code is trying to do, neither from your code nor from your description. Can you please look at the following list and expand it so we have a common understanding of what the code is supposed to do?
If the above description is correct, then consider using Tie::File to treat a line-oriented file just like an array. For removing files, see unlink, not delete. You will also likely want to use the File::Glob::bsd_glob function instead of the find program.
For your coding style, please don't use C-style for loops. They are almost always an error. It's better to use the foreach-style of loops.
You haven't told us what the output of your program is and where it enters into an infinite loop. If you would provide a self-contained example that does not rely on a specific directory structure and specific files, that would help us replicate your problem and then we could help you better with your concrete problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Manipulating Arrays
by shekarkcb (Beadle) on Jun 12, 2009 at 08:19 UTC | |
by Corion (Patriarch) on Jun 12, 2009 at 08:28 UTC | |
by shekarkcb (Beadle) on Jun 12, 2009 at 11:27 UTC |