Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5941731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:09:05+00:00 2026-05-22T16:09:05+00:00

After extracting, I want to put each IP Address I extracted & printed on

  • 0

After extracting, I want to put each IP Address I extracted & printed on the screen into an array. How can I do this? Here is my code:

#!/usr/bin/perl

use HTTP::Request;
use LWP::UserAgent;

my $url = 'http://www.game-monitor.com/';
my $request = HTTP::Request->new(GET => $url);
my $useragent = LWP::UserAgent->new();
my $response = $useragent->request($request);
my $result = $response->content;

@m = ($result =~ /\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b/sg);
foreach (@m) {
    print "$_\n";
}
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:09:05+00:00Added an answer on May 22, 2026 at 4:09 pm

    What do you mean? Your IPs already are in an array, @m, but if you want to put them in something else, one at a time, you can use push @somethingelse, $_

    Also, you should always use strict; Add these lines to top of your code:

    use strict;
    use warnings;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After extracting and saving the ant files into an opt/ directory and setting the
I am parsing an XML file, and after extracting some information, I want to
After loosing much sleep I still cannot figure this out: The code below (its
After the user fills my backing bean with info through the forms, I want
After I thought that I've understood how they work, I tried this: NSString *str1
After executing a XPath expression for extracting all year and value elements associated with
I'm extracting some information from an XML file, and I want to perform some
Let's say, I want to separate certain combinations of elements from an array. For
I am completing a tutorial which can be found here...http://www.elated.com/articles/cms-in-an-afternoon-php-mysql/ I am having problems
I have a text file that I want to compress after it gets an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.