Home: Perl Programming Help: Intermediate:
Why can't I save to the clipboard?

New User

Oct 10, 2016, 11:23 AM

Views: 3385
Why can't I save to the clipboard?

I have a very simple Perl script that saves text to the clipboard. I've done this a million times before, but all of a sudden whenever I call this code:

use strict; 
use Win32::Clipboard;

$| = 1;

my $text = "Will not save!";
my $clip = Win32::Clipboard->new();

I get this error:
Goto undefined subroutine &AutoLoader::AUTOLOAD at C:/Perl64/lib/Win32/Clipboard.pm line 45.

Does anybody have any idea what's going on here? Thanks in advance.

New User

Oct 11, 2016, 7:04 AM

Views: 3376
Re: [Bobt1234] Why can't I save to the clipboard?

Problem solved.

My computer had been infected with the SONAR.Cryptlock!g93 virus, a piece of ransomware that encrypts every file on your drive, then asks for payment to un-encrypt it.

Last night my antivirus caught and quarantined another instance of it, and now copying to the clipboard works. Apparently some system files were messed up.