Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I like this very much! I would ask for one more feature, is this is possible. (I'm maybe 80% sure it is... this is Windows, though, so customizability is lower than I would like.)

What I want is something similar to the -- eval macro, but somewhat different. I want to be able to copy any Perl code, press a key combination (Windows+P for Perl?) and have the pasted text become the output of the Perl code. This is because often I want to run Perl code I've spotted on the web, and can't insert one of the -- macro headers.

My brain is racing ahead, coming up with so many use cases for this, both with my proposed enhancement and without. Here's a few with the existing version, for the doubters:
  • Easy sorting by arbitrary Perl-style sorting blocks
  • Applying a regex (m//, s///, tr/// the possibilities here are making me drool) to the text following.
  • Transformations with an arbitrary map, grep, reduce.
  • Web lookup (Google define, custom Mechanize scripts to collect some data off other sites)
  • eval the first line, followed by input to the evaled code.
I'm generating ideas so fast I'm forgetting them. If you do any kind of text mangling on Windows, this is a godsend.
If only I had a thousand more upvotes to give. You've made my month.

Edit: I notice it's Windows-only, but with a Unix-style shebang. I assume you have it running under Cygwin? If I want it running at startup on ActiveState, should it work?

In reply to Re: clipcommand.pl (Embed perl into your clipboard) by bradenshep
in thread clipcommand.pl (Embed perl into your clipboard) by antirice

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (13)
    As of 2014-07-29 14:49 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (218 votes), past polls