in reply to List of selected files
In fact, that's usually short enough that I just open-code it rather than have a subroutine.my @Dir = ReadDirectory("dirName", qr/\.html/); sub ReadDirectory { local *MYDIRHANDLE; my ($dir, $pat) = @_; opendir MYDIRHANDLE, $dir or return (); map "$dir/$_", grep $pat, readdir MYDIRHANDLE; }
-- Randal L. Schwartz, Perl hacker
|
|---|