It is application of the method []
taking an array as the argument.
Since the OP did not make clear, we cannot tell what charmap
is, but for example if it were a hash, then charmap[[char, c = input.getc]]
would return the value in charmap
that corresponds to the key [char, input.getc]
.