--- Dug Stokes
Hi!
Has anyone got five minutes to spare to be able to tell me how to get a list of files in the current directory with <option></option> around each file?
So far I've written;
print "<select name=file><option>";
print `ls\n`;
print "</option></select>";
But naturally, I need the <option> bit around each filename!
Please help!
Dug Stokes
Hey Dug, Try This................... -------------------------------------- #!/usr/bin/perl -w opendir(DIRHANDLE,"/home/abc123"); @filenames = readdir(DIRHANDLE); open(OUT, ">~/output.txt") || die "eek!!" foreach (@filenames) { #process each file name while (<OUT>) { print "<option>$_</option>\n"; } } -------------------------------------------- :) -- Thomas Adam ===== Thomas Adam "The Linux Weekend Mechanic" -- www.linuxgazette.com __________________________________________________ Yahoo! Plus For a better Internet experience http://www.yahoo.co.uk/btoffer