求哪位大虾帮一下忙!

求哪位大虾帮一下忙!

求哪位大虾帮一下忙!
我是初学者,写了一个将文本转换的程序,运行起来怎么都得不到结果,很着急.望哪位大虾能帮着看看.

#!/usr/bin/perl -w
#convertnets.pl
use warnings;
use strict;

sub convert
{
open(ORIG,"<$_[0]")||die"can't open $_[0] for input\n";
open(OUT,">$_[1]")||die"can't open $_[1] for output\n";
my @nets;
my $noline=0;

while(my $line=<ORIG>)
{
my @words=split /s+/,$line;
chop $line;
if($noline>7)
{
if($words[0]eq "NetDegree")
{push @nets,[];}
else
{my $value;
$value=grep{$_ eq ~/a|p/}@words;
push @{$nets[$_]}, $value;
}
}
else {$noline++;}
}

for(my $i=0;$i<$#nets+1;$i++;)
{
for(my $j=0;$j<$#nets[$i]+1;$j++)
{print OUT $nets[$i]->[$j];}
print OUT ".\n";
}
close(ORIG);
close(OUT);
怎么人回帖--虽然我不会.
怎么人回帖
虽然我不会,但是还是顶一下...