I'm writing handler which generate some html from files in requested
dir if requested file does not exist.
I have a problem with getting file list of the directory.
I've tried to use IO::Dir, like this
my @htmls;
my $dh = new IO::Dir ($req_dir);
if (defined $dh)
{
while (defined($_ = $dh->read))
{
if(m/(\w*?\.html)/)
{
unshift(@htmls,$_);
}
}
}
This code successfully create array, but at the same time apache prints
something to user. And I have an abbracadabra in browser.
May be I've missed some better way of getting file names?