It depends on your OS/shell. In unix-type shells, ! must be escaped because of its special meaning as a command history/substitution character. I just verified this on 3 shells: sh, bash and tcsh.
However, at a Windows DOS prompt, it is not necessary to escape the !.
Comment on Re^3: how to ignore regex in input to getopt::Long