I have a perl script that sets the title of the XTerm emulator we are using (Putty). This works just fine. However I would like to be polite and capture the original title and restore it when my script is finished.
I can find innumerable references on how to set the title of an XTerm window, but nothing on how to get the title. Does anyone have some insight?
I have discovered the escape sequence ^[[21t; outputs the title but it doesn't go to either STDOUT or STDERR! How can I capture it then?