Lets take, Application's login page has invoked in IE by IE::Mechanize or IEAutomation module. Provide valid user name, invalid password and click on the login button by script written with help of IE::Mechanize or IEAutomation module.
On clicking login button, message "Incorrect user name/password gets displayed in application. Is it possible to catch that message by script.