
13/04/2002, 04:16
|
 | | | Fecha de Ingreso: enero-2002
Mensajes: 2.349
Antigüedad: 23 años, 1 mes Puntos: 1 | |
Re: Error en código # Proceeds as long as the record number is less than the total
# number of records in the file and the correct record hasn't been found yet.
while (($correctspot eq 'N') && ($record <= $#infile))
{ ($count,$filename,$eol) = split(/\|/,$infile[$record]);
if ($filename eq $File) #if this is the right record, hit it, trip correctspot
{$count++;
$infile[$record] = join ("\|",$count,$filename,"\n") ;
$correctspot = 'Y';
}
$record++;
}
if ($correctspot eq 'N')
{ $count = 1;
$newrecord = join ("\|",$count,$File,"\n");
push @infile, $newrecord;
}
@outfile = sort {($b =~ /(\d+)/)[0] <=> ($a =~ /(\d+)/)[0]} @infile;
seek (CNT,0,0);
print (CNT @outfile);
truncate (CNT,tell(CNT));
close (CNT);
print "Content-type: text/html\n";
print "Location: $DownloadFile\n\n";
sub endIt # exit on error
{ exit;
} # end endIt |