我对perl很新,只是发现了一些非常意外的行为.
我使用从File::Copy
移动来重命名文件夹.它按预期工作,但是当我查看返回值变量$!之后,它显示错误.
我使用的相关代码:
@H_502_15@$helpr =~ s/\./ /g; move($file,$helpr); print $!;输出:
@H_502_15@[j@Box test]$ls my.test.dir [j@Box test]$fileRenamer.pl No such file or directory [j@Box test]$ls my test dir无论如何,当作业完成时,为什么会出现错误代码?我错过了什么?
感谢大家!