It's a closure because it contains a reference to a lexical variable ($q) from a parent scope. It could cause problems if later you reassigned $q and thought it would change inside the sub, or thought it go away after the scope of $q ended.
In reply to Re: Re: Re: Re^3: Perl to Ruby translator?
by kelan
in thread Perl to Ruby translator?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |