メッセージを別のファイルにリダイレクトして、die
後でそのファイルを比較して何が問題なのかを判断できるようにしたいと考えています。
しかし、このコードは私にエラーを与えます:
$ cat test.pl
use strict;
use warnings;
my $log = "msglog.log";
die $log "DEAD$!";
$ perl test.pl
Missing comma after first argument to die function at test.pl line 5, near ""DEAD$!";"
Execution of test.pl aborted due to compilation errors.
$
2>
発信者からのa を実行したくありません。スクリプト内からリダイレクトする方法はありますか?