On 16 December 2012 21:25, Dave Mitchell via RT <perlbug-followup@perl.org>wrote: > I think you have confused the optopt() function with the getopts() > function. I think you mean "getopt", not "optopt". Quite right! I switched from getopt to getopts, and then wrote the bug report thinking I was still using getopt. The former doesn't recognise ':', and assumes that every switch > has an argument > Given that this is of little interest, maybe it's worth reordering the documentation so that getopts is documented first? Then fewer programmers will start using the obviously-named function, then discover that it has this weird behaviour and switch to getopts. Really, getopt should be deprecated. (Interestingly enough, getopts() seems to treat the ':' both as an argument > placeholder and an option!) Surely that's a bug? It's not documented. -- http://rrt.sc3d.orgThread Previous