That sounds pretty tricky... You should search CPAN for some of the OLE:: or Win32:: to see if something may select text and/or copy selection to clipboard, for instance Win32::CtrlGUI. From there Win32::Clipboard will allow you to manipulate clipboard content.