in reply to Re: Processing all files in a directory
in thread Processing all files in a directory

Thanks sauoq, for all those points. Silly of me not to match to the correct variable. And I'm not speaking the perl lingo fluently enough yet to remember that dumping an array to a scalar just gives the number of items in the array!!

Prepending the filename was what I needed as well - I assumed that something would "remember" from the opendir.

I managed to fix the mis-positioning of the close file myself (I was only reading the first line of each file for a while there).

  • Comment on Re: Re: Processing all files in a directory

Replies are listed 'Best First'.
Re: Processing all files in a directory
by Abigail-II (Bishop) on May 26, 2003 at 12:26 UTC
    Prepending the filename was what I needed as well - I assumed that something would "remember" from the opendir.

    Well, I can imagine people assume the results from readdir have the directory name prepended. But if you think so, you wouldn't use /^\./ to weed out filenames, would you? Because then you would either select all filenames in the directory, or none at all, depending whether the directory name starts with a dot or not.

    Abigail

      Heh, that would require thinking logically, now wouldn't it? Thanks for the clarification!