相关疑难解决方法(0)

为什么我的Perl脚本在"〜/"上失败但与"$ ENV {HOME}"一起使用?

我一直在使用我的这个脚本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)

unix linux perl

1
推荐指数
1
解决办法
3878
查看次数

标签 统计

linux ×1

perl ×1

unix ×1