On 4 Feb 2004 at 21:52, Jimmy Bodkin wrote: > > I have used the --gui option so that there is no CMD window held up in the > back ground while the program is used. > > I would like to give the script an option so that if the script is run using > a -v option it tells the version number of the script. > > I can get this to work if I do not use the --gui option but it will not work > with this option turned on. > > I have tried printing the info to STDERR, STDOUT, and just doing a die on > the script. >
You can't have it both ways. pp just changes the Windows header to a GUI/non-console type. When Windows starts a non-console app, there is no STDOUT or STDERR attached to that application, for you or for "die". You can't do anything with them, like print or pipe or whatever. I think you can open a new console window with the Win32::Console module, and do STDOUT/STDERR there, but I don't recall details. Alan Stewart
