in reply to dos window

While you have a console window, are you sure it's interactive? (I.e. does it have STDIN connected?)

As an alternative, if you just want to show an error dialog (and don't need actual input back), you might consider Win32 and Win32::MsgBox() instead.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.