use IO::Dir qw[DIR_UNLINK]; tie my %d, 'IO::Dir', '.', DIR_UNLINK;