我一直在使用我的这个脚本FOREVER,我一直用"〜/"来扩展我的主目录.我今天上班了,它停止了工作:
#if ( $output eq "" ) { $output = "~/tmp/find_$strings[0].rslt" } # BROKEN
if ( $output eq "" ) { $output = "$ENV{HOME}/tmp/find_$strings[0].rslt" } #WORKS
...
open OUT_FILE, ">$output" or die "cant open $output : $!";
Run Code Online (Sandbox Code Playgroud)
关于为什么会突然停止工作的任何想法?
错误看起来像:
cant open stephen/tmp/find_coverp.rslt : No such file or directory at /user/stephen/bin/find.pl line 137.
Run Code Online (Sandbox Code Playgroud)