{"blog_title":"Islands in the byte stream (legacy)","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgfx.hatenadiary.org%2Fentry%2F20091204%2F1259908987\" title=\"RFC: A new syntax to give a method an extra block - Islands in the byte stream (legacy)\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","description":"In Shibuya.pm#12, I have proposed a new syntax to Perl, which allows to give a method an extra block like Ruby.For example: File->open('<', $file) { my($io) = @_; $io->grep{ /^foo/ }->each{ say @_ }; }; This is simply interpreted as: File->open('<', $file, sub{ my($io) = @_; $io->grep(sub { /^foo/ }\u2026","height":"190","blog_url":"https://gfx.hatenadiary.org/","width":"100%","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/gfx/","url":"https://gfx.hatenadiary.org/entry/20091204/1259908987","image_url":null,"provider_url":"https://hatena.blog","title":"RFC: A new syntax to give a method an extra block","categories":["Perl"],"published":"2009-12-04 15:43:07","author_name":"gfx"}