Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Clipboard transform keys

by PhilHibbs (Hermit)
on Aug 18, 2003 at 10:15 UTC ( [id://284526]=note: print w/replies, xml ) Need Help??


in reply to Re: Clipboard transform keys
in thread Clipboard transform keys

Here's the script that transforms an URI into a HTML link:
@rem = '--*-Perl-*-- @echo off perl -x -S "%~dpnx0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl @rem '; #!perl #line 8 use strict; use warnings; use HTML::Entities; use Win32::Clipboard; my $CLIP = Win32::Clipboard(); my $text = $CLIP->GetText; if (substr($text,0,1) ne '<') { chomp $text; $text = encode_entities($text); $CLIP->Set('<a href="'.$text.'"></a>'); } __END__ :endofperl
Update:Uses HTML::Entities to translate & to &amp; etc.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://284526]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-28 16:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found