Basically I want to create a component that I can use for creating a file management type listing. Something along the lines of if it's an html file, show its size, date created and an icon denoting the file type. I want to do the same with other files in the directory. I'm getting closer. Taking more work then I thought.
Is File:Find a type of module like this? Thanks again. -----Original Message----- From: "$Bill Luebkert"<[EMAIL PROTECTED]> To: "Mark Bergeron"<[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Date: Mon Nov 25 12:54:28 PST 2002 Subject: Re: example / tutorial for listing files? >Mark Bergeron wrote: >> I've come up with this work snippet: >> >> chdir( "C:\\files\\" ); >> local( @files ) = <*.plx>; >> foreach $file( @files ) { >> if( !-d $file ) { >> print " <br><a href=\"$file\">$file</a> \n"; >> } >> } >> >> how would I add dir to this in addition to the files? > >What does that mean ? Do you mean you want to recurse down through the subdirs ? > >If so, I would use File::Find. > >Untested: > >use strict; >use File::Find; > >&find (\&wanted, 'C:/files'); > >sub wanted { > return if -d or not /\.plx/i; > print qq{ <br><a href="$_">$_</a>\n}; >} > >__END__ > >-- > ,-/- __ _ _ $Bill Luebkert ICQ=162126130 > (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] > / ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl) >-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/ > ___________________________________________________ GO.com Mail Get Your Free, Private E-mail at http://mail.go.com _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs