http://www.perlmonks.org?node_id=902253


in reply to Changing the title of the command window on which the perl exe is run

Wow. The snarkiness is flying today! And yet no one has the answer! Kuh-ching!

First, an explanation of why your approach doesn't work. When you run system from Perl, you are running a new shell, which is to say a new copy of CMD.exe, which has its own environment. You type title <something> and it works, but as soon as the new shell exits, you're back in the parent shell, which never had its title changed. You have to do it from inside, via the Win32 API.

use Win32::Console; my $CONSOLE=Win32::Console->new; $CONSOLE->Title('This is a new title - Huzzah!');

That will change the title for the duration of your script. When the script ends, the title will revert to what it was before you ran the script. You can change the title as much as you want.

Cheers!

--marmot