in reply to Perl...CGI...Things I want to do
You can then use the array to generate the form fields on your page. If you wanted to get only files with, for example, extension .txt, you would use <$path*.txt>my $path = 'yourdir/yoursubdir/'; # or whatever my @filearray; while (<$path*>) { s/$path//; # strip off the filepath push @filearray, $_; # push the filename into the array }
... though if you knew that already... well silly me.)while (my $file = <$path*>) { $file =~ s/$path//; push @filearray, $file; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl...CGI...Things I want to do
by ellem (Hermit) on Oct 05, 2001 at 03:15 UTC |