#use strict; #use warnings; $/=undef; $d=; print " Hello\n"; print if $d=~ /Device |interface |VRID|state|primary address/i; my (@ip)=($d=~m/number addresses(?:.*?)((?:\d{1,3}\.){3}\d{1,3})/gsi); print "The addresses are: ". join("\n",@ip)."\n"; __DATA__ logging to Device F01 is 19.9.16.11... Showing the vrrp status VRRP Interfaces Interface WEB_A Authentication: NoAuthentication VRID 39 State: Master Time since transition: 582693 hfghfghfghghghfghfhhfgh Primary address: 195.51.205.220 Number addresses: 1 195.51.205.222 Monitored circuits: Afgh_A (priority 1fgh50) SRghf1 (priority 1fgh50) Interface DATA_DL Nufghfghmber of vhfghl roufgh Fgfhfghs: AuthefghfgntichoAhfhication VRID 2556 State: Master Time since transition: 13405375 Bahfgh Flafghfghgs: Advertfghdl: 1 Rfghfghfgval: 3fghfghfgh fghfsgh VfghfghVRghfg Vh Primary address: 19.18.27.65 Next advertisement: 0 Number addresses: 1 15.12.57.234 I logging to Device L2 is 14.359.1.2... Showing the vrrp status VRRP Interfaces Interface SDC_A Nughujgj AuthentijghjghjNoAuthentication VRID 9 State: Backup Time since transition: 582695 Mghjghjer: hgjghjghj0 BahhjFlags: Adverghjad Interval: 3 VMAChj VMAhj1:ef Primary address: 195.51.205.221 Masghjghjg Number addresses: 1 195.51.205.222 Interface SA Numbehgjghjr of virtualj: 1 Fghjg Authentijghjtion VRID 7 State: Backup Time since transition: 582695 Master: 62.187.224.12 Baseghjghj4 Flags: Advertisement ihjghjRouterhjghj3jghjVRRP VMAC: ghj:01jghj Primary address: 62.187.224.13 Mastghjghj Number addresses: 1 6.17.26.14