I have written this code, but it does not work. Can someone point out the issue?
sub match_ip() { my $ip = \"The IP address is 216.108.225.236:60099\"; i
use strict; use warnings; open(FH,") { push(my @arr,($line)); foreach my $arrVal (@arr) { if($arrVal=~/IPv4 Address(?=.*\b((25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2 [0-4]\d|[0-1]?\d?\d)){3})\b)/) { print "$arrVal\n"; } }