Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: tweaking of perldoc function (sorting/preserving order)by lodin (Hermit) |
on Jan 18, 2008 at 08:42 UTC ( [id://663028]=note: print w/replies, xml ) | Need Help?? |
Note that your code (and almut's) incorrectly calculates the difference. perlfaq4 (from where the code is taken): Note that this is the symmetric difference, that is, all elements in either A or in B but not in both. Think of it as an xor operation. That means that what ikegami calls "complement of intersection" is was perlfaq4 calls "(symmetric) difference". Different authors have different definitions for difference and the symbol they use, such as - or \. perlfaq4 is correct with the definition of difference it provides. lodin
In Section
Seekers of Perl Wisdom
|
|