in reply to Shortening "$bar{foo} if exists $bar{foo}"?
That's handy for very long expressions, and, when you assign something to $_, the original value of $bar{foo} will be changed too (that's what "aliasing" means), but I think you won't think it much of a gain in this simple case, either, as it still looks like your last example.for($bar{foo}) { $_->() if $_; }
|
|---|