if ( do{ local$"=''; @array1 == @array2 and "@array1" eq "@array2"} ) { print 'They are the same', $/; } #### my @a = ( 'onetwo','', 'three'); my @b = ( 'one', 'two', 'three' );