
1. Pseudo-hashes are deprecated
The "Pseudo-hashes are deprecated" error means you're trying to access an array as a hash,which means that either$data->{file} or$data->{file}{path} is an arrayref.
2. defined 解释
用于判断变量是否为 undef,未定义, 不能用于数组和hash
Many folks tend to overuse defined and are then surprised todiscover that the number0 and "" (the zero-length string) are,in fact,defined values.
0 and "" (the zero-length string 用 if () 来判断即可
3. or || 和 and &&的区别
本身没有区别,习惯问题 ,但是有时候牵涉到运算符优先级的问题,结果会不同
left &
left | ^
left &&
left || //
nonassoc .. ...
right ?:
right = += -= *= etc.
left ,=>
nonassoc List operators (rightward)
right not
left and left or xor
以上是内存溢出为你收集整理的perl 异常总结全部内容,希望文章能够帮你解决perl 异常总结所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)