Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: XP Perl Replacement for "Send to Clipboard as Filename"

by Sandy (Deacon)
on Aug 20, 2009 at 16:22 UTC ( #790131=note: print w/ replies, xml ) Need Help??


in reply to XP Perl Replacement for "Send to Clipboard as Filename"

Great! I love it!

I used wperl instead of perl so the command window doesn't flash at me.

C:\Perl\bin\wperl.exe -e "use Win32::Clipboard;Win32::Clipboard($ARGV[ +0]);"
Sandy


Comment on Re: XP Perl Replacement for "Send to Clipboard as Filename"
Select or Download Code
Re^2: XP Perl Replacement for "Send to Clipboard as Filename"
by Melly (Hermit) on Aug 20, 2009 at 16:38 UTC

    And I love wperl - never knew about it before. Thanks!

    map{$a=1-$_/10;map{$d=$a;$e=$b=$_/20-2;map{($d,$e)=(2*$d*$e+$a,$e**2 -$d**2+$b);$c=$d**2+$e**2>4?$d=8:_}1..50;print$c}0..59;print$/}0..20
    Tom Melly, pm (at) cursingmaggot (stop) co (stop) uk
      wperl is particularly useful if you are writing gui apps (such as Perl/Tk).

      Down side, any error/warning messages disappear into aether surrounding your computer.

      Usually I use perl while coding/debugging, and wperl for release

        Down side, any error/warning messages disappear into aether surrounding your computer.

        I once hacked a module that calls Win32::MsgBox() whenever a fatal error occurs, so you see errors even when running wperl:

        package ExePM::Carp; use strict; use warnings; use base 'Exporter'; use Carp qw(); use Win32; our @EXPORT=qw(confess croak carp); our @EXPORT_OK=qw(cluck die); our $VERSION='1.00'; BEGIN { *CORE::GLOBAL::die=$main::SIG{__DIE__}=\&ExePM::Carp::die; } sub confess { ExePM::Carp::die Carp::longmess @_; } sub croak { ExePM::Carp::die Carp::shortmess @_; } sub carp { warn Carp::shortmess @_; } sub cluck { warn Carp::longmess @_; } sub die { my ($arg,@rest)=@_; CORE::die($arg,@rest) if ref($arg) || $^S || Carp::longmess()=~/ev +al [\{\']/m; $arg=join('',$arg,@rest); unless ($arg=~/\n$/) { my ($pkg,$file,$line)=caller(0); $arg.=" at $file line $line.\n"; } Win32::MsgBox($arg,MB_ICONSTOP,$0); CORE::die($arg); }; 1;

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re^2: XP Perl Replacement for "Send to Clipboard as Filename"
by Anonymous Monk on Aug 25, 2009 at 20:16 UTC

    Excellent. You can even copy multiple file names by using

    C:\Perl\bin\wperl.exe -MWin32::Clipboard -e Win32::Clipboard(join(qq(\ +r\n),@ARGV))

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2014-09-22 01:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls