perl程序问题求助!

perl程序问题求助!

perl程序问题求助!
程序运行结果出现:out of memory!是怎么回事?
代码贴上来.
#!/usr/bin/perl ----.
#!/usr/bin/perl

#use strict;

my $dir;
print "Tell me The directory of dnasequence which need to handle:\n";
chomp($dir=<STDIN>);
opendir(DIRNAME, $dir) || die "Cannot open $dir: $!";
my @dirnames=readdir DIRNAME;
close(DIRNAME);

my $dirtwo;
print "Tell me The directory of dnasequence which placed the handled sequence:\n";
chomp($dirtwo=<STDIN>);
opendir(DIR, $dir) || die "Cannot open $dirtwo: $!";


for (my $i=2;$i<=$#dirnames;$i++){
my $IN_name="$dir/$dirnames[$i]";
open IN_NAME, "<$in_name" or die "Cannot open $in_name: $!";
@fred=<IN_NAME>;
shift @fred;
foreach $fred(@fred){
chomp $fred;
}
$jiang=join "",@fred;

my $out_name="$dirtwo/handled_$dirnames[$i]";
open OUT_FILE,">$out_name" or die "Cannot creat $out_name: \n$!\n\nmaybe you should creat a new directory have name you gived\n";

print OUT_FILE $jiang;

close IN_NAME;
close OUT_NAME;
}
在我的6688上写JAV.
在我的6688上写JAVA经常出现这种问题;没有想到Perl也有这种问题.我看一下先
我在丁香园上发贴求教,有.
我在丁香园上发贴求教,有人告诉我是内存不足,我过我前些日子运行的时候还没有出现这种情况呢。
十分感谢啊!我刚开始学这.
十分感谢啊!我刚开始学这个,很多地方不懂,以后还要请多多关照!