in reply to handle ERROR 32 using perl script

madtoperl:

Short answer: no.

Long answer: Generally, a perl script isn't going to be able to handle a system error for you. A system error typically occurs when you ask the operating system something to do something, and the operating system can't or won't do it.

According to http://msdn.microsoft.com/en-us/library/ms681382(VS.85).aspx, system error 32 is a sharing violation. So Windows is telling you that the file is already in use, and the current user doesn't want to share the resource. The way to handle that would be to: (a) close the other application, (b) alter the application to allow sharing, and/or (c) update the current application to report the problem and offer to let you try something else, rather than fail.

...roboticus