The map is doing two things here: grabbing only the files that end in .html, and prepending the path to mimic the behavior of the glob.#!/usr/bin/perl -wT use strict; delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; my $dir = '/var/www/htdocs'; opendir(DIR, $dir) or die "Can't opendir $dir: $!\n"; my @entries = map { /\.html\z/ ? "$dir/$_" : () } readdir(DIR); closedir(DIR);
In reply to Re: Newbie Tainted glob question
by chipmunk
in thread Newbie Tainted glob question
by elbie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |