Windows Clipboard

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I want to write to the windows clipboard from a PERL program.
Can anyone tell me how, please

Re: Windows Clipboard

Simon Guest wrote:
Quoted text here. Click to load it

Dear Simon,

   If you're using ActiveState Perl (you can find out by typing "perl
-v" at a DOS prompt), you can easily copy text to the Windows clipboard
with the command:

      Win32::Clipboard()->Set("text for clipboard");

Of course, this will only work if you use the Win32::Clipboard module,
like this:

      use Win32::Clipboard;

   Read more about the Clipboard module by typing this at a DOS prompt:

      perldoc Win32::Clipboard

   I hope this helps, Simon.

   -- Jean-Luc

Re: Windows Clipboard

On 2005-04-29, Simon Guest scribbled these
curious markings:
Quoted text here. Click to load it

It's Perl (the language) or perl (the program), but never PERL.

Quoted text here. Click to load it

Have you thought of looking at some of the Win32 modules on CPAN?

Best Regards,
Christopher Nehren
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
If you ask the wrong questions, you get answers like "42" and "God".
Unix is user friendly. However, it isn't idiot friendly.

Re: Windows Clipboard


Quoted text here. Click to load it

Since you're running Windows it's 100:1 that you're using ActiveState
Perl.  If so then look in the HTML Help; towards the bottom on the LH
pane you'll find a module called Win32::Clipboard.  Care to guess what
it does?

Or open a command window and type

    perldoc Win32::Clipboard

.... but the HTML is easier.

Site Timeline