Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Not what you asked for, but others may be interested. On Windows, it looks like this (run pl2bat on it):
    #!/usr/bin/perl -w
    use strict;
    use Win32::Clipboard;
     
    Win32::Clipboard->Set( join("", <STDIN>) );
     
    __END__
  • xclip http://people.debian.org/~kims/xclip/ [debian.org] looks like it does what your looking for
    • Looks perfect, but it's a no-op on my system. It installed just fine, but even the example programs don't do anything :/

    • No error message? Have you tried both reading and writing,maybe your apps are using different buffers to what xclip is expecting.
    • I installed the debian package (from sarge) and the samples seemed to work well for me.

      The debian maintainer added a note to the copyright file (http://packages.debian.org/changelogs/pool/main/x/xclip/xclip_0.08-4/xclip.copy right) that might interest you.

      "Since Kim Saunders is the upstream author and was the Debian maintainer and was missing, I'm doing upstream type fixes in my own repository which can be seen at: http://svn.ev-en.org/viewsvn.php?project=xclip"

      Regards,
      -james.
  • Cutting is hard, because you need an app that'll "own" the selection, and deal with paste requests.

    Here's a short TCL/Tk script that does it, based on something similar I had for pasting. It's quite suboptimal, but should give the idea. Reimplementing in perl, and incorporating some smart forking and one-daemon-per-desktop code would be really nifty! ;)

    #!/usr/bin/wish -f
    # xcopy - set the current string selection to whatever's passed in on stdin

    set text [read stdin]

    # Set up the data handler ready for