in reply to avoiding error message
Are you sure you want that array slice there? Perhaps @serverarr[5] should really be $serverarr[5]?