{"id":3209,"date":"2023-11-09T19:21:19","date_gmt":"2023-11-10T04:21:19","guid":{"rendered":"https:\/\/crm270s.wordpress.com\/?p=3209"},"modified":"2023-11-09T19:21:19","modified_gmt":"2023-11-10T04:21:19","slug":"firefox_02-pl","status":"publish","type":"post","link":"https:\/\/crm270s.mycpamytax.com\/?p=3209","title":{"rendered":"firefox_02.pl"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>use strict;\nuse warnings;\n\n# Initialize an array to store extracted content\nmy @extracted_content;\n\n# Process each HTML file (1.html to 25.html)\nfor my $file_number (1..25) {\n    my $input_file = \"${file_number}.html\";\n\n    # Open the current input file for reading\n    open my $input_fh, '&lt;', $input_file or warn \"Cannot open input file '$input_file': $!\";\n\n    # Read each line and look for URLs and +82 content\n    while (my $line = &lt;$input_fh&gt;) {\n        chomp $line;\n\n        # Extract URLs matching \/https:\\\/\\\/www\\.google\\.com\\\/maps\\\/place\/\n        if ($line =~ \/https:\\\/\\\/www.google.com\\\/maps\\\/place\/) {\n            # Remove leading '&lt;' and trailing '&gt;'\n            $line =~ s\/^&lt;(.+)&gt;$\/$1\/;\n            push @extracted_content, \"$input_file,$line\";\n        }\n\n        # Extract content starting with +82 and going to the end of the line\n        if ($line =~ \/\\+82(.+)\/) {\n            my $plus82_content = \"+82$1\";  # Include +82 in the extracted content\n            push @extracted_content, \"$input_file,$plus82_content\";\n        }\n    }\n\n    # Close the current input file\n    close $input_fh;\n}\n\n# Save the extracted content to a file\nmy $output_file = 'firefox_02.txt';\nopen my $output_fh, '&gt;', $output_file or die \"Cannot open output file '$output_file': $!\";\nforeach my $entry (@extracted_content) {\n    print $output_fh \"$entry\\n\";\n}\nclose $output_fh;\n\nprint \"Extraction complete. Extracted content is saved in '$output_file'\\n\";\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[26],"tags":[],"class_list":["post-3209","post","type-post","status-publish","format-standard","hentry","category-codes"],"_links":{"self":[{"href":"https:\/\/crm270s.mycpamytax.com\/index.php?rest_route=\/wp\/v2\/posts\/3209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/crm270s.mycpamytax.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crm270s.mycpamytax.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crm270s.mycpamytax.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crm270s.mycpamytax.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3209"}],"version-history":[{"count":0,"href":"https:\/\/crm270s.mycpamytax.com\/index.php?rest_route=\/wp\/v2\/posts\/3209\/revisions"}],"wp:attachment":[{"href":"https:\/\/crm270s.mycpamytax.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crm270s.mycpamytax.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crm270s.mycpamytax.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}