Thanks for your reply. I would like to note that even when a warning is generated when i use @array[0], the output is the same as when i use what perl suggests i.e. $array[0]. So both ways @array[0] vs $array[0] produce the same result but the former generates a warning.