filling a select box with a list of files

B

brett

Hi,

I'm looking for a perl script that can fill a "select" box (combo) from a
file listing in a particular directory. Can someone direct me to a script
that has already been written, or is this easy to do?

eg., if the directory contained the files: f1.txt and f2.txt, the select box
on the html page would have those files in the select box. If more files
were added to the particular directory, (upon refresh) the script would
automatically re-fill the select box with the new files.

Thanks for your help,
Brett.
 
J

Jürgen Exner

brett said:
I'm looking for a perl script that can fill a "select" box (combo)

No idea what you are talking about here.
from a file listing in a particular directory. Can someone direct me

Just use glob() to get all the files in a given directory, trivial.
to a script that has already been written, or is this easy to do?

eg., if the directory contained the files: f1.txt and f2.txt, the

$files = glob ("*.txt");

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top