in reply to explanation of passages of a Perl script
The last verb, used quite-frequently here, causes the enclosing for or foreach loop to end immediately.
Like you, I find the code as-written to be cryptic and confusing. Variable names like $sub2 and $sub22 do not convey any semantic meaning or clues. Simple comments, directed to "the next programmer who will be looking at this," would help enormously. "Talk to me ... tell me what you are doing here, and why. Use variable-names that are suggestive." Use use strict; use warnings; and declare all of the variables that you use. Such niceties might mean nothing to the Perl compiler, but they mean everything to real people.
|
|---|