Think about Loose Coupling | |
PerlMonks |
Re^2: Validate windows filenames.by zzspectrez (Hermit) |
on Jul 14, 2005 at 07:07 UTC ( [id://474780]=note: print w/replies, xml ) | Need Help?? |
Actually my code did check for an error but the module that I used did not return an error. And even worse, instead of not moving the file and leaving it were it was, it just deleted it or moved it into oblivion.So even if I caught the error what was I to do: die "You are gonna hate life now. The file move failed and the source file has been deleted. Goodbye.\n"; But thanks for the obvious.... other peoples modules are great, untill they dont work as advertised.Not pointing fingers... I THINK the module should have handled this situation better, however I failed to validate the filename before trying to move the file.. Maybee the OS did not return an error to the module. who knows. This was one of my earlier scripts and worked great for a long time ( many years ) till it found and MP3 TAG with invalid characters in it. So back to the original question.... How do you validate filenames???
In Section
Seekers of Perl Wisdom
|
|