filling a select box with a list of files

Discussion in 'Perl' started by brett, Feb 21, 2005.

  1. brett

    brett Guest

    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.
    brett, Feb 21, 2005
    #1
    1. Advertising

  2. brett wrote:
    > 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
    Jürgen Exner, Feb 21, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J. Muenchbourg
    Replies:
    1
    Views:
    142
    Dr John Stockton
    Jul 29, 2003
  2. palmiere
    Replies:
    1
    Views:
    377
    Erwin Moller
    Feb 9, 2004
  3. Sjaakie
    Replies:
    6
    Views:
    196
  4. Mohsen Pahlevanzadeh
    Replies:
    0
    Views:
    109
    Mohsen Pahlevanzadeh
    Sep 9, 2013
  5. MRAB
    Replies:
    0
    Views:
    108
Loading...

Share This Page