CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
How to list files in a ListBox

 



adolfo
Novice

Aug 31, 2001, 6:22 AM

Post #1 of 3 (647 views)
How to list files in a ListBox Can't Post

I need to list all the image files that are located on a specific dir in a listbox,
Which function should I use?
Thanx again.
I love these forums !, u know =)


~Adolfo~


crashinto
Novice

Aug 31, 2001, 11:52 AM

Post #2 of 3 (644 views)
Re: How to list files in a ListBox [In reply to] Can't Post

Use something like:

opendir (DR,"PATHTODIRECTORY");
@files = readdir(DR);
closedir (DR);
foreach $line (sort @files) { print qq| <SELECT><OPTION VALUE="$line">$line</SELECT> |; }

Don't know if that will work but you can try.



adolfo
Novice

Aug 31, 2001, 12:38 PM

Post #3 of 3 (643 views)
Re: How to list files in a ListBox [In reply to] Can't Post

Thanx crashinto!!!!!
It worked!

~Adolfo~

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives