#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @files;
my $parse;
my @files = <*>;
foreach $file(@files)
chomp ($file);
{
$parse = system qq(paste <(cut -f1,2,13 $file) <(cut -f12 $file));
}
"my" variable @files masks earlier declaration in same scope at Rast_seq.pl line 11.
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
請幫我解決這個錯誤。在多個文本的Perl + Linux的重新排列列宿
,如果你表現出樣品輸入/輸出這將是一件好事。爲此我使用shell命令是相當多餘的,我懷疑,但我不確定你想要做什麼。當字符串中出現括號而雙引號不用時,使用'qq()'是很愚蠢的。這是你的麻煩來源。 – TLP 2013-03-18 10:29:15
你能解釋你想做什麼嗎?您正在使用Perl,然後調用系統命令。 '$ parse'是否包含一些有趣的東西?它唯一包含的是你的'system'命令的退出狀態。爲什麼不簡單地在Perl或shell中完成整個事情?如果我認爲我理解你在做什麼,那麼你可以完全在shell或Perl中完成,併爲自己節省很多麻煩。 – 2013-03-18 19:37:52