On the topic of things that look different but do (almost?) the same
thing, is there ever any reason to prefer one of these over the other:
my $v1 = do {
1;
};
my $v2 = sub {
1;
}->();
?
(The sub approach lets you do an actual return, which does suit the
construction, but the "}->();" bit sure is ugly...)
--M.
--
http://beebo.org
--
http://beebo.org