cik_ail has asked for the wisdom of the Perl Monks concerning the following question:
Here the question,$line_a=0; $line_b=0; open(PLAIN, "plain.txt") or die "File does not exist: $!"; while(<PLAIN>){ @my_a[$line_a] = $_; $line_a++; } close PLAIN; open(COUNTER, "counter") or die "File does not exist: $!"; while(<COUNTER>){ @my_b[$line_b] = $_; $line_b++; } close COUNTER; $element1 = @my_a; $element2 = @my_b; $i = 0; $j = 0; while ($element1 > $i) { if ($element2 <= $j){ $j = 0; } @my_c[$i] = @my_a[$i] ^ @my_b[$j]; @my_d[$i] = @my_b[$j] ^ @my_c[$i]; $i++; $j++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading two (2) file in byte[] form and then XOring them
by sgifford (Prior) on Feb 24, 2005 at 06:48 UTC | |
by cik_ail (Initiate) on Feb 25, 2005 at 02:37 UTC | |
by sgifford (Prior) on Feb 25, 2005 at 05:49 UTC | |
|
Re: Reading two (2) file in byte[] form and then XOring them
by PodMaster (Abbot) on Feb 24, 2005 at 06:06 UTC |