in reply to Comparing Two Files

The files in question are XML. Why not use one of the nice Perl XML modules and convert it into a data structure as ikegami suggested?
One disadvantage of this approach would be speed and more memory usage if the file is very large.( say +10MB?)