in reply to (jeffa) Re: File Name Pattern
in thread File Name Pattern
You might also want to make sure that all the filenames are in the format you think they are:
warn "Invalid file $file" unless $file =~ /^\d{3,6}\.jpe?g$/;
This will complain unless the filename consists of 3-6 digits, followed by a period and the suffix "jpg" or "jpeg". You might want to make a pass before you start moving files, just to make sure your directories contain what you think they contain.