Created
October 30, 2011 13:01
-
-
Save asiamoth/1325879 to your computer and use it in GitHub Desktop.
クリップボードにコピーした文字列から重複した行だけを削除する!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Tkx qw( clipboard ); | |
my $text = Tkx::clipboard('get'); | |
$text = do { | |
my %count; | |
join "\n" | |
=> grep { !$count{$_}++ } | |
split m{ \n }msx, $text; | |
}; | |
Tkx::clipboard( 'append', $text ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment