http://qs321.pair.com?node_id=1030261


in reply to Re^2: RFC: Simulating Ruby's "yield" and "blocks" in Perl
in thread RFC: Simulating Ruby's "yield" and "blocks" in Perl

FWIW, the equivalent in idiomatic Python3 is:
def test() print("You are in the method") yield 1 print("You are again back to the method") yield 2 for a in test(): print("You are in the block #{}".format(a))
As for anonymous multiline blocks, a while back a monstrosity was released...