Thanks for your reply
Sorry, i made the mistakes you have mentioned. I just want to convey the logic only.
@Array and $Temp should be declared "my". And i would like to return @Array only not @List. And i'm using $Temp stuff for useability purpose only.
I've some where studied that the ankle bracket constructor is equivalent to the malloc() in C.
Can you please tell me when'll be the memory, allocated for $Temp, freed.