I have searched the Internet (1) and am unable to find how to read from the memory buffer from which I have copied text (using Ctrl-C, Select->Copy, ...) into a perl script. (2)

An example would be, from news.google.com, the story "Bank dividends may not be sacrosanct after all" at http://www.smh.com.au/business/banking-and-finance/bank-dividends-may-not-be-sacrosanct-after-all-20150930-gjy7hk.html (3) .

I would like to transform the above title into :

BankDividendsMayNotBeSacrosanctAfterAll

... and ultimately into :

20151001_smh_BankDividendsMayNotBeSacrosanctAfterAll.html

... which would be the name of the file to which I would save the HTML.

Footnote

(1) I have used the search terms "perl how-to read memory buffer" and "perl how-to read memory buffer -file".

(2) For now, I am trying to write a perl script to run from the command line on an xterm window. I would prefer to create a small rudimentary X11 input form. Is that possible with perl?

(3) Where the URL itself describes the page content, as in the given example, I use text fromm that URL, but many web pages don't have such descriptive URLs. I those cases, I copy the title of the page and begin to laboriously transform the title as I have shown.


In reply to How to read from text previously copied into memory buffer into perl script? by daggett

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.