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.
我将如何解决我的代码中的以下错误:
在 faStat2 第 59 行的标量赋值中使用未初始化的值。
#!/usr/bin/perl use strict; use warnings; ... $~ = *OUTFILE; #This is the line it is complaining about my $cmd = $0; $cmd =~ s#.*/##;
OUTFILE应该用单引号引起来,因为没有它们它是一个裸词,并且在它前面有 * 被视为需要标量的项目。代码应如下所示:
OUTFILE
#!/usr/bin/perl use strict; use warnings; ... $~ = 'OUTFILE'; my $cmd = $0; $cmd =~ s#.*/##;