{"author_url":"https://blog.hatena.ne.jp/gfx/","author_name":"gfx","width":"100%","blog_title":"Islands in the byte stream (legacy)","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgfx.hatenadiary.org%2Fentry%2F20080829%2F1219979909\" title=\"macro.pm - 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>","published":"2008-08-29 12:18:29","image_url":null,"version":"1.0","provider_name":"Hatena Blog","url":"https://gfx.hatenadiary.org/entry/20080829/1219979909","blog_url":"https://gfx.hatenadiary.org/","provider_url":"https://hatena.blog","title":"macro.pm","description":"PerlVM\u3092\u76f4\u63a5\u3044\u3058\u308b\u306e\u306f\u5927\u5909\u3060\u304c\uff0cPPI\u3068\u30bd\u30fc\u30b9\u30d5\u30a3\u30eb\u30bf\u3092\u4f7f\u3048\u3070\u6bd4\u8f03\u7684\u7c21\u5358\u306bPerl\u3092\u62e1\u5f35\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u306a\u3044\uff0c\u3068\u601d\u3063\u3066\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u66f8\u3044\u3066\u307f\u305f\u3002 macro - An implementation of macro processor \u3053\u306emacro.pm\u306fcpp(1)\u306b\u4f3c\u305f\u30de\u30af\u30ed\u3092\u63d0\u4f9b\u3059\u308b\u3002 use macro add => sub{ $_[0] + $_[1] }, addprint => sub{ print add($_[0], $_[1]), \"\\n\" }; addprint(40, 2); # => 42 \u3053\u308c\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5c55\u958b\u3055\u308c\u308b\u3002 do{ print do{ \u2026","type":"rich","height":"190","categories":["Perl"]}