{"title":" chomp() \u306f $/ \u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u3068\u77e5\u308c\uff01","height":"190","author_name":"gfx","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgfx.hatenadiary.org%2Fentry%2F20131116%2F1384587925\" title=\" chomp() \u306f $/ \u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u3068\u77e5\u308c\uff01 - 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":"2013-11-16 16:45:25","categories":[],"blog_title":"Islands in the byte stream (legacy)","version":"1.0","width":"100%","description":"perldoc\u306b\u3042\u308b\u3088\u3046\u306b\u3001chomp()\u306e\u6319\u52d5\u306f $/ \u306b\u4f9d\u5b58\u3057\u307e\u3059\u3002\u3068\u3044\u3046\u3053\u3068\u306f\u3001\u3046\u3063\u304b\u308a local $/ \u3057\u305f\u30b9\u30b3\u30fc\u30d7\u3067 chomp() \u3092\u884c\u3046\u3068\u3001\u4f55\u3082\u304a\u304d\u307e\u305b\u3093\u3002\u3053\u306e\u7d50\u679c\u8d77\u304d\u308b\u73fe\u8c61\u304c\u304d\u308f\u3081\u3066\u4e0d\u53ef\u89e3\u306a\u306e\u3067\u3001readline\u306e\u76f4\u5f8c\u4ee5\u5916\u306e\u5834\u9762\u3067\u306fchomp()\u3092\u4f7f\u308f\u305a s/\\r?\\n\\z//xms \u3059\u308b\u306e\u304c\u7121\u96e3\u3067\u3057\u3087\u3046*1\u3002 use strict; use warnings; local $/; my $s = \"Hello\\n\"; chomp $s; print \"[$s]\\n\"; # => #[Hello #] Xslate\u304c\u307e\u3055\u306b\u3053\u308c\u306b\u306f\u307e\u3063\u3066\u3044\u305f\u306e\u3067\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002https://g\u2026","provider_url":"https://hatena.blog","type":"rich","author_url":"https://blog.hatena.ne.jp/gfx/","image_url":null,"provider_name":"Hatena Blog","url":"https://gfx.hatenadiary.org/entry/20131116/1384587925","blog_url":"https://gfx.hatenadiary.org/"}