- 论坛徽章:
- 2
|
回复 10# sunzhiguolu
大神元旦好。。。
现在我把测试代码改成了这样子:
use warnings;
use strict;
use diagnostics;
my $fastaFile = "C:/perl/1.txt";
my ($line, @lines) = ();
open In, "$fastaFile" or die "Cannot find the specified fasta file $fastaFile";
@lines = <In>;
chomp(@lines);
close(In);
open OUT, ">C:perl/out.txt";
for (my ($sOffset, $sCnt, $sLength, $sStrLength, $sSection) = (0, 0, 147, length ($line)); $sStrLength >= $sOffset; $sOffset += $sLength){
print OUT "substr ($line, $sOffset, $sLength)\n";
}
系统提示:
Use of uninitialized value $sStrLength in numeric ge (>=) at
C:\perl\106.pl line 12 (#1)
我该怎么改。。。 |
|