To avoid misunderstandings: It's similar but not identical!
DB<106> sub tst { (sub { return 5 })->(); return 10 } DB<107> tst() => 10 DB<108> sub tst { do { return 5 }; return 10 } DB<109> tst() => 5
Like with map and grep is the block following do not an anonymous sub!
Cheers Rolf
(addicted to the Perl Programming Language)
In reply to Re^3: Bless and Do on the outside
by LanX
in thread Bless and Do
by zeltus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |