{"published":"2014-05-07 00:00:00","type":"rich","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiww.hateblo.jp%2Fentry%2F20140507%2Ffile_get_contents\" title=\" \u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092\u5168\u3066\u6587\u5b57\u5217\u306b\u8aad\u307f\u8fbc\u3080 - \u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["perl"],"url":"https://iww.hateblo.jp/entry/20140507/file_get_contents","title":" \u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092\u5168\u3066\u6587\u5b57\u5217\u306b\u8aad\u307f\u8fbc\u3080","image_url":null,"height":"190","blog_title":"\u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12","author_name":"iww","width":"100%","description":"\u30d7\u30ed\u30bb\u30b9\u751f\u6210\u306e\u30b3\u30b9\u30c8\u3068\u304b\u6c17\u306b\u306a\u3063\u305f\u3089\u3061\u3083\u3093\u3068\u66f8\u304d\u76f4\u3059\u3002\u6c17\u306b\u306a\u3089\u306a\u3051\u308c\u3070\u3053\u306e\u307e\u307e\u3002 my $text = `cat a.txt`; In Perl, how can I read an entire file into a string? - Stack Overflow my $text = do { local $/=undef; open(my $fh,\"a.txt\"); <$fh> }; my $text; open(my $fh,\"a.txt\"); while(<$fh>){ $text.=$_ } open(my $fh,\"a.txt\"); my $text = join \"\", <\u2026","author_url":"https://blog.hatena.ne.jp/iww/","provider_name":"Hatena Blog","version":"1.0","blog_url":"https://iww.hateblo.jp/"}