UBB.Dev
Posted By: CTM [Perl] Files and Directories - 04/12/2003 5:17 PM
I'm writing a basic To-Do List script in Perl (my life needs organising rather badly tipsy ), and I've made some progress. However, I'm just stuck at one specific point.

Could someone explain to me how to loop through all files in one directory and print all their contents into separate lists, please? This is what I'm aiming to do:

I want to create collapsible lists on a HTML page based on the contents of files in a "Data" directory. For example, if I had Coursework.txt, Homework.txt and Other.txt in the "Data" directory, this is what I'd like to be output:

[code][/code]The "Delete" button would obviously be there so I could delete the item when I've done it wink I already have the JavaScript to collapse the separate categories, that's not a problem.

I wouldn't usually ask, but there are no pre-written to-do scripts anywhere, the Perl tutorials I can find are terrible, and I'm really desperate for help. frown

Is anyone willing to help me with this one, please?
Posted By: Burak Re: [Perl] Files and Directories - 04/12/2003 10:07 PM
use File::Find;

standard in 5.8, dont know other versions...
Posted By: CTM Re: [Perl] Files and Directories - 04/13/2003 9:21 AM
Will do, jeo, thanks smile
Posted By: CTM Re: [Perl] Files and Directories - 04/14/2003 1:38 AM
Got the job sorted with (lots of hours of) help from LK tonight... Thanks again smile
© UBB.Developers