http://www.perlmonks.org?node_id=241411


in reply to GetOpt::Long usage style

This is a very nice style, and I will start to use it.

The main point why it works is that, Perl allows you to my variables on fly (you only need to declare it when you need it), and it would be valid all the way to the end of the scope in which it is declared. (In this particular case, we don't see a scope change)