Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Clipboard to file

by clemburg (Curate)
on Aug 21, 2001 at 21:06 UTC ( [id://106644]=note: print w/replies, xml ) Need Help??


in reply to Clipboard to file

Put this into a ".bat" file, e.g., "clipfile.bat" (one line!):

@perl -MWin32::Clipboard -e "binmode(*STDOUT); $c=Win32::Clipboard(); +print $c->Get();" > clipfile.txt

Update: Added binmode() call as in tilly's suggestion.

Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com

Replies are listed 'Best First'.
Re (tilly) 2: Clipboard to file
by tilly (Archbishop) on Aug 21, 2001 at 21:10 UTC
    You should binmode STDOUT or else the newlines may be messed up. With that in place:
    @perl -MWin32::Clipboard -e "binmode(*STDOUT); print Win32::Clipboard- +>Get();"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://106644]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-16 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found