The quotes around "$code[0]" are superfluous, to start
You could have just written it as "$code[0].$code[1].$code[2]" in one swell foop
Of course that locks you in to a fixed number of elements; if you want to join an arbitrary number of items in @code then just use join: $item = join( ".", @code );