IS THE BELOW CORRECT?my $str = 'BIG BIG DATA FILE'; if (my @matches = $str =~ m{ ([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0- +9]{1,3}:[0-9]{1,5}) }xmsg) { print qq{matched @matches}; }
It will extract all occurrences of what you define as an 'ip address' to the array.
BTW again: It is better to reply to a post immediately after (and 'below') the post rather than as an addendum to the OP: makes the conversation a lot easier to follow.
In reply to Re: Extracting IP address from large text file.
by AnomalousMonk
in thread Extracting IP address from large text file.
by Monkomatic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |