{"id":182,"date":"2013-08-21T20:00:00","date_gmt":"2013-08-21T20:00:00","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/Hayek\/Jochen\/wp\/blog-en\/2013\/08\/21\/reading-a-growing-file-in-perl\/"},"modified":"2013-08-21T20:00:00","modified_gmt":"2013-08-21T20:00:00","slug":"reading-a-growing-file-in-perl","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2013\/08\/21\/reading-a-growing-file-in-perl\/","title":{"rendered":"reading a growing file in perl"},"content":{"rendered":"<p><\/p>\n<ul>\n<li>How do I read a file which is constantly updating?\u00a0(Stack Overflow)\u00a0[<a href=\"http:\/\/stackoverflow.com\/questions\/1425223\/how-do-i-read-a-file-which-is-constantly-updating\">link<\/a>]<\/li>\n<li>How can I read from continuously updated file in Perl? (Stack Overflow) [<a href=\"http:\/\/stackoverflow.com\/questions\/915926\/how-can-i-read-from-continuously-updated-file-in-perl\">link<\/a>]<\/li>\n<\/ul>\n<div>\nApproaches:<\/div>\n<div>\n<ul>\n<li><a href=\"https:\/\/metacpan.org\/module\/File::Tail\">File::Tail<\/a> (or one of its sisters) is your friend (preferred!)<\/li>\n<li>use this (together with sleep(&#8230;)) for getting EOF reset: seek(LOG, 0, 1) (if you must stay with vanilla perl)<\/li>\n<\/ul>\n<div>\nWrote my 1st script making use of <a href=\"https:\/\/metacpan.org\/module\/File::Tail\">File::Tail<\/a> today, a &#8220;main log file&#8221; referring to short other log files. Now I read all of them using <a href=\"https:\/\/metacpan.org\/module\/File::Tail\">File::Tail<\/a>. Looks good and rather versatile.<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>How do I read a file which is constantly updating?\u00a0(Stack Overflow)\u00a0[link] How can I read from continuously updated file in Perl? (Stack Overflow) [link] Approaches: File::Tail (or one of its sisters) is your friend (preferred!) use this (together with sleep(&#8230;)) for getting EOF reset: seek(LOG, 0, 1) (if you must stay with vanilla perl) Wrote [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_share_on_mastodon":"0"},"categories":[666],"tags":[],"class_list":["post-182","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-2W","jetpack_likes_enabled":true,"amp_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=182"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/182\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}