in reply to Fetdching filenames starting numbers.
next if (($_ != m/^\.+$/) || ($_ != m/^ws\_ftp/i));line. Get rid of the "$_ !=" in each of them.
The reason for this has to do with Perl numeric conversion of strings. I believe that what it is doing is applying the match, getting back either a 1 (true) or "" (false). The 1 is a one, no problem in converting it there, but the "" converts to 0.
Then when it converts your file name (and it does this due to the !=, a numeric operation) "1234.ppt" it gets back 1234, which will not match either a 1 or a 0. For files that don't start with numbers, you're not having the problem because they're all converting to 0.
I'm a little surprised you haven't gotten any filenames that start with ws_ftp, though. It seems like you should be getting some bad filenames as well as having the others omitted.
|
|---|