Aug 21, 2000, 5:13 PM
Post #6 of 7
Ok, Thanks Japhy,
But I tried doing that well before my previous post. I can't get the contents of all the files to be stored into an array I've tried everything I can think of with your code and I can't get it to work for me.
I know how to use -f opendir but I don't need that for what I'm trying to do.
I want to count the lines of all of the files in a directory. The number of files is always changing and there are too may to do one by one. There are about 1,500 files on average in each directory, and that number is always going up. Yet I need to count the combined total of all the lines in all the files. I also would like to be able to filter the files too. That is why I need to treat all of the files as one by storing them into an array.
It seems like japhy's code would work fine but I just don't get it??
Japhy, how would you then handle the data, wouldn't you handle the data through the array @lines?
I asumed that's what I would do since it seemed logical. I thought that <> was the data that was globbed from all of the .txt files. So I tried to print @lines to test it and I didn't get anything.
Can You still help me?
But I see what You mean about picking out files kanji,
the latest code I tried is
@all = glob("/dir/data/*.db");
No 500 error but nothing prints.
Probably way off anyway.
[This message has been edited by perlkid (edited 08-21-2000).]