現在のディレクトリ内のファイルのすべてのファイル ハンドルをハッシュの値として格納するコードがあります。キーはファイルの名前です。
my %files_list;    #this is a global variable.
sub create_hash() {
    opendir my $dir, "." or die "Cannot open directory: $!";
    my @files = readdir $dir;
    foreach (@files) {
        if (/.text/) {
            open(PLOT, ">>$_") || die("This file will not open!");
            $files_list{$_} = *PLOT;
        }
    }
}
コンパイルの問題に直面しているコードで print ステートメントを使用しています。
my $domain = $_;
opendir my $dir, "." or die "Cannot open directory: $!";
my @files = readdir $dir;
foreach (@files) {
    if (/.text/ && /$subnetwork2/) {
        print $files_list{$_} "$domain";    #this is line 72 where there is error.
    }
}
closedir $dir;
コンパイル エラーは次のとおりです。
String found where operator expected at process.pl line 72, near "} "$domain""
        (Missing operator before  "$domain"?)
syntax error at process.pl line 72, near "} "$domain""
誰かが私が障害を理解するのを手伝ってくれますか?