You should probably look at Javascript rather than Perl. Perl programs associated with websites are (almost?) always CGI programs which run on the web server, not on the computer used to view the site, so they know nothing about cursor positions and the like, and only run when the page is loaded. Javascript runs in the browser used to view the site. Bear in mind that quite a few people have javascript turnd off in their browsers, and won't see whatever it is you are trying to do, so make sure that the information is available in some other way.

Update: after reading BrowserUK's post below I wonder if it was me who mis-interpreted what you are trying to do. Are you trying to write a website which will do this in people's browsers when they look at it or are you trying to write a program for use on your computer which you will use when you look at other people's websites?


In reply to Re: Perl application to read the current browser page by Bilbo
in thread Perl application to read the current browser page by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.