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


in reply to Closures clarification

First of all a closure is a subroutine, and your second example doesn't include one.

Secondly in a closure you have access to a variable in an outer scope, which is "enclosed" in the sub (hence the name), in your first example $total_size.