Clipboard - Copy and paste with any OS
use Clipboard; print Clipboard->paste; Clipboard->copy('foo');
Clipboard->cut() is an alias for copy(). copy() is the preferred method, because we're not really "cutting" anything.
Also see the scripts: clipaccumulate clipbrowse clipedit clipfilter clipjoin
Who doesn't remember the first time they learned to copy and paste, and generated an exponentially growing text document? Yes, that's right, clipboards are magical.
With Clipboard.pm, this magic is now trivial to access, in a cross-platform-consistent API, from your Perl code.
Seems to be working well for Linux, OSX, *BSD, and Windows. I use it every day on Linux, so I think I've got most of the details hammered out (X selections are kind of weird). Please let me know if you encounter any problems in your setup.
Ryan King <firstname.lastname@example.org>
Copyright (c) 2010. Ryan King. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Clipboard, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.