Wiggins d'Anconia wrote: > Robert wrote: >>When Perl is doing this comparison is it doing it line by line (like an >>actual DIFF) or is it putting the lines into an "array" and the checking >>that array against the second file? > > Well yes and no, to both. It is storing the lines temporarily, but it is > storing them to a hash, not an array. Then it is checking them line by > line. Depending on the purposes there are several large differences > between the code and a "DIFF". For one, order is not maintained in a > hash so it is really checking just to see if the line did exist in the > first file, rather than that they are in the same order, which matters > to a diff. Secondly it is checking to see if that line is in fact Perly > true, so if a line consisted of just a 0 it would be false and return a > false negative.
No, the line contents are stored in the hash key but the check is done on the hash value which is always one. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>