in reply to readdir
For another approach, you can try:
# my @files = <c:/temp/xxxx*>; # or better my @files = glob 'c:/temp/xxxx*'; [download]
Untried on win32, but should work.
After Compline,Zaxo