Perl格式未终止

0 format perl

我在这段代码编译期间收到格式未终止错误.

    while(@studentNames) {
            my $name = pop(@studentNames);
            my $age = pop(@studentAges);
            my $GPA = pop(@studentGPAs);

            format STDOUT =
            @<<<<<<<<<<<<<<<<<<<<<<<<<<< @<< @<<<
            "test", "42", "0.0"

            .

            write;
    }
Run Code Online (Sandbox Code Playgroud)

我正在尝试编写一个类似下面的表到STDOUT,然后最终输出文件.

    name1            age1 GPA1
    name2            age2 GPA2
    ...
Run Code Online (Sandbox Code Playgroud)

提前致谢

cho*_*oba 5

点必须放在第一列中.

    format STDOUT =
@<<<<<<<<<<<<<<<<<<<<<<<<<<< @<< @<<<
"test", "42", "0.0"

.
Run Code Online (Sandbox Code Playgroud)