in reply to Re^2: Bless and Do on the outside
in thread Bless and Do
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Bless and Do on the outside
by Anonymous Monk on Jun 18, 2014 at 01:25 UTC | |
by LanX (Saint) on Jun 18, 2014 at 01:37 UTC | |
by Anonymous Monk on Jun 18, 2014 at 01:55 UTC |