我一直在試圖弄清楚如何運行這個例子一段時間,而我仍然堅持如何打印日期。以下是我正在處理的示例。獲取perl腳本的錯誤輸出。
(The Script for Unix/Linux)
# Backquotes and command substitution
1 print "The date is ", 'date'; # Windows users: 'date /T'
2 print "The date is 'date'", ".\n"; # Backquotes treated literally
3 $directory='pwd'; # Windows users: 'cd'
4 print "\nThe current directory is $directory.";
(Output)
1 The date is Mon Jun 25 17:27:49 PDT 2007.
2 The date is 'date'.
4 The current directory is /home/jody/ellie/perl.
這是我的工作和輸出。
print "The date is ", 'date /T';
print "The date is 'date'", ".\n";
$directory='cd';
print "\nThe current directory is $directory.";
(Output)
The date is date /TThe date is 'date'.
The current directory is cd.
任何幫助,這是非常感謝。謝謝。
因爲類似的問題,當我第一次嘗試孩子的時候,它不鼓勵我編程,所以我會添加這樣的建議:美國鍵盤上的[backtick](https://en.wiktionary.org/wiki/backtick) ESC下面的按鈕。在其他佈局上,可能很難找到。在例如一個德語單詞,它是退格鍵左邊的按鈕,在按住Shift鍵的同時按下空格鍵,然後按空格,因爲它的意思是[重音符號,叫做重音符號](https://en.wikipedia.org/?title= Grave_accent),也可以放在一個字母上,比如'è'。如果沒有幫助,請從這裏複製:'\'' – simbabque
或使用'qx()',它更易於輸入,甚至可能看起來更好。 –