Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Biomart Perl API 从网络服务器下载数据。有时我会收到错误消息:Web 服务器问题:500 读取超时。是否有可能以某种方式捕获此错误并尝试再次下载文件?
您是通过 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"; }