Is there a built in way in Tcl to read flags from the command line arguments, similar to GetOptions in Perl?
GetOptions
The cmdline package from tcllib is probably a good fit. Also there are lots of other custom code to do this sort of things--for instance, see this and this pages on the wiki and the pages they link to.