There seem to be two issues here: 1) getting the data
out of your perl app, and 2) getting the data
into the other application. Gtk-perl lets you access the clipboard via GTK::Editable. You can select data and paste it into the clipboard under program control. This solves number 1. Number 2 is harder: there is no guarantee that a given X program is "friendly" enough to accept clipboard data (although most probably are). Also, you'd need to be able to tell that application, "Get the data in the clipboard now and paste it at the insertion point." I know of no universal way to do that.
Gtk-Perl does support drag-and-drop so you may be able to talk to another app that knows drag-and-drop, but again, that is not universal.
I'm not sure what you really want to do, but if your goal is to talk to netscape see this article for information on how to control a netscape session from the command line (or system/backticks in perl).
You might also want to see this page for a scheme for doing something similar to what you describe. It uses X directly and I don't know of any perl bindings supporting that.
HTH, --traveler
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.