Not a perl solution but I prefer to use sdiff for things like this.
In reply to Re: Comparing the contents of two files by derby in thread Comparing the contents of two files by archer