Skip to content

Instantly share code, notes, and snippets.

@skaji
Created September 14, 2012 20:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skaji/3724492 to your computer and use it in GitHub Desktop.
Save skaji/3724492 to your computer and use it in GitHub Desktop.
TeraTerm でクリップボードにコピー
#!/usr/bin/env perl
use strict;
use warnings;
use MIME::Base64;
use Encode;
binmode STDIN, ':encoding(utf8)';
my $input = do {
local $/;
<STDIN>;
};
$input =~ s/ \n+ \z//xsm;
$input = encode_base64( encode('cp932', $input), q{} );
print "\e]52;;$input\e\\";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment