2 个有问题的示例:以下语句语法有什么问题(perl 新手):
$mailCmd = sprintf("echo $message | /usr/ucb/mail -s 'X Detected an Invalid Thing' %s", $people_list);
当我做system($mailCmd)
or`$mailCmd`
时,它会导致:
sh: syntax error at line 2: `|' unexpected
另一个:
$message = "Invalid STUFF setup for ID $r. Please correct this ASAP.\n" .
"Number of thingies = $uno \n" .
"Another thingy = $id \n" ;
这会产生:
sh: Number: not found
sh: Another: not found
提前致谢