in reply to create a array which is XOR of two arrays

What you've shown does not exactly match your description. An XOR (symmetric difference) operation (per the FAQ) would leave @final = ( t3, t5, t7, t8 );. Ie. Those elements that appear only in one or the other array but not both.

To achieve what you've shown (and described except for the XOR reference), you could do

C:\test>p1 @array1 = qw[ t1 t2 t3 ];; @array2 = qw[ t1 t2 t5 t7 t8 ];; @seen{ @array1 }=(); @final = grep !exists $seen{ $_ }, @array2;; print "@final";; t5 t7 t8

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.