我在我的Ubuntu 14.04 LTS中安裝了Perl 5.18.2版本。Perl複製到剪貼板不能使用剪貼板模塊
現在我已經在geany對此我下面燒創建的自定義命令:
perl /home/ubuntu/geany_custom_cmds/get_current_directory_path.pl %f %d %e
及以下get_current_directory_path.pl
文件的代碼:
#!/usr/bin/perl -w
# print $ARGV[0];
use Clipboard;
foreach $argnum (0 .. $#ARGV) {
print "$ARGV[$argnum]\n";
Clipboard->copy($ARGV[$argnum]);
print Clipboard->paste;
}
但我沒有得到任何參數的價值在我的Ubuntu剪貼板,我可以按Ctrl + V粘貼。
歡迎任何建議。
*總是*'使用strict'和'使用警告'all''在您編寫的每個Perl程序的頂部 – Borodin
我試圖在Windows 7系統中安裝Win32 :: Clipboard,但也失敗了,所以我可以不要使用Win32 :: Clipboard。我得到一些測試失敗的錯誤 –