in reply to Comparing Arrays
Or, you could use the Array::Compare module from CPAN which basically does what you do, but allows you to choose the join character so that you avoid the problems that others have pointed out.