尝试运行时遇到错误:
/home/kes/perl5/perlbrew/perls/perl-5.8.9/bin/perl -I/home/kes/work/projects/perl_libs/t/lib -I/home/kes/work/projects/perl_libs/t/../lib -d:DbInteract="t();q" -e "sub t {
return ( 1, undef, undef, 2 );
}
sub a {
my @list = ( 1, undef, undef, 2 );
return @list;
}
1;
"
Can't find string terminator "^@" anywhere before EOF at /home/kes/work/projects/perl_libs/t/lib/Devel/DbInteract.pm line 15.
Compilation failed in require.
BEGIN failed--compilation aborted.
我应该更改什么来修复错误?
答案 0 :(得分:3)
答案 1 :(得分:-1)
尝试转义您的@
符号(这样您就拥有\@list
)。
或者,将脚本捕获从双引号更改为单引号。例如
... DbInteract="t();q" -e 'sub t { ..... } 1;'