There isn't any real limit that I am aware of, except for the memory overhead 
and practical limitations of what your computer can handle.

I would like to recommend however that, instead of reading the contents of 
your files into memory and then calculating the results after the fact, you 
might want to perform your comparisons as you go.  For instance:

open IN1, "file1";
open IN2, "file2";
while ($line1 = <IN1> and $line2 = <IN2>) {
  # compare $line1 to $line2
}
close IN1;
close IN2;

This of course depends on what these files contain, and what you are trying to 
compare.

On Wednesday 24 September 2003 03:18 am, [EMAIL PROTECTED] wrote:
> Hello all!
>
> I have problems with comparing two big text files with eachother (~4Mb).
> the script reads (or tries to read) both files into @tables and compare
> them line by line after that, but no result is being shown. Script
> searches for new productcodes ($Urivi[3]).
>
> Is there any limit to @table size or what could be wrong?
>
>
> -------------------------------------
> //source:
>
> foreach $tmp (@Uusi) {
>   $Loytyi = 0;
>   @Urivi = split "\t", $tmp;
>
>     for ($i=0; $i<=$Vanhankoko-1; ++$i) {
>       @Vrivi = split "\t", $Vanha[$i];
>
>       if ($Urivi[3] eq $Vrivi[3]) {
>         #print "Tuotekoodit täsmää\n";
>         $Loytyi = 1;
>         $i = $Vanhankoko;
>       }
>     }  #end for
>
>   if ($Loytyi == 0) {
>     #print "$Urivi[4] $Urivi[3]\n";
>     $temppi = $Uudettuotteet;
>     $Uudettuotteet = $temppi."=".$Urivi[4]."_".$Urivi[3];
>     $Loytyi = 0;
>   }
> }
>
>
> _______________________________________________
> Perl-Unix-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

-- 
/* Michael A. Nachbaur <[EMAIL PROTECTED]>
 * http://nachbaur.com/pgpkey.asc
 */

`I am so amazingly cool you could keep a side of meat in me for a month. I am 
so hip I have difficulty seeing over my pelvis.'


_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to