关于perl中设置观察点进行调试的问题

一个简单的perl程序
my $str="whm";

print "fisrt:".$str."\n";
$str="mhw";
print "second:".$str."\n";

进入调试状态
perl -d testp2.pl

设置观察点
DB<1> W $str
DB<1> c
fisrt:whm
second:mhw

W设置观察点之后毫无效果,程序直接执行结束。
请列位大神指教,我哪里做错了!
万分感谢!!!

作者: cnmtchbgs   发布时间: 2011-06-08

通过perldoc perldebug命令查看debug帮助文档之后,终于发现问题所在
小写w是设置watchpoint,大写W是删除watchpoint.

作者: cnmtchbgs   发布时间: 2011-06-09