in reply to IP-Stored in file not working
I think Choroba is right but you can fix it.
# capture number as well, additional group: if ($_ =~ m/UEH(\d+)(.*)=\s+([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0- +9]{1,3})/i) { my $number = $1; my $file_ip = $3; # ip now third group! if ($file_ip =~ m/^11\.\d+\.\d+\.\d+/) { my $abc = "UEH".$number . "_ip"; # use $number instead of $ +ii
I cannot test it but you should be able to...
|
|---|