It's not really for the savings, as he already said, so much as for the conceptual purity. The only reason to use a block here is parsing rules. I can say something like
@username = map scalar getpwuid($_), @uid;
The only reason I can't say
@year = map (localtime $_)[5], @timestamp;
# "Not enough arguments for map at line XY"
is parsing rules. Using a block just because this is parsed slighly differently than the first example basically feels like a kludge, like clutter. It's like saying
print do { (localtime $timestamp)[5] };
instead of
print +(localtime $timestamp)[5];
Makeshifts last the longest. |