我想显示 perl 脚本的整个源代码。在 .perldb 中添加了以下行:
$DB::alias{'code'} = 'l 1+99999;';
.perldb chmod 设置为 700。发出我的别名后,我收到以下错误:
DB<1> code
Number found where operator expected at (eval 8)[/usr/share/perl5/perl5db.pl:2312] line 1, near "l 1"
(Do you need to predeclare l?)
Couldn't evaluate `code' alias: syntax error at (eval 8)[/usr/share/perl5/perl5db.pl:2312] line 1, near "l 1"
别名似乎已正确加载:
DB<2> =
code l 1+100;
编辑:当我使用 '=' 命令定义别名时,它按预期工作:
DB<2> = code l 1+99999
shcd = l 1+99999
DB<3> =
code l 1+99999
我做错了什么?