我正在使用Biomart Perl API从web服务器下载数据。有时我会收到错误信息: Problems with the web server: 500 read timeout。有没有可能以某种方式捕捉到这个错误并再次尝试下载文件?
发布于 2014-07-17 22:02:46
您是通过Perl命令还是通过模块命令来阅读本文?或者对外部程序进行炮击?因为所有这些都有不同的Perl错误变量。
# $@ = error from Perl
# $! = error from C library
# $^E = error from OS
# $? = error from external program
eval {
read command;
more stuff;
}; # Notice semicolon here!
if ($@)
{print "ERROR: $@\n";
}https://stackoverflow.com/questions/24797388
复制相似问题