... my $regexpaaa=qq/-i -e \'\^AAA=\'/ -e \'\^XXXXX\ AAA=\'/; my @command2 = ("ssh us@pp -o BatchMode=yes grep $regexpaaa $dir/$file"); ...