- or download this
opendir DIR, $dir;
while ($file = readdir DIR) {
if ($file =~ /\.jpg$/) {
...
}
}
closedir DIR;
- or download this
use HTML::Template;
$t = HTML::Template->new(filename => 'dropdown.tmpl');
$t->param(IMAGES => \@images);
print "Content-Type: text/html\n\n", $t->output;
- or download this
<form action="">
<select name="images">
<TMPL_LOOP IMAGES>
<option><TMPL_VAR image></option>
</TMPL_LOOP>
</form>
- or download this
#!/usr/bin/perl -w
use strict;
use vars qw($my $vars $are $here);