Code: [show] | [select all]
use Win32::Clipboard;
use IO::Handle;
use Time::HiRes 'sleep';
STDOUT->autoflush(1);
print "Select files, then copy to clipboard\n";
my $clip = Win32::Clipboard;
$clip->Empty();
my @files;
while (1)
{
sleep 0.3;
print ".";
@files = $clip->GetFiles();
if ( $files[0] ne "" )
{
print join "\n", @files;
$clip->Empty();
last;
}
}