in reply to Re^2: IP address validation when IP is picked dynamically
in thread IP address validation when IP is picked dynamically

chomp is needed (if the IP address is the last text on the line after the split), but it may not be a complete solution to your problem. Consider the following code:
use warnings; use strict; use Data::Validate::IP qw(is_ipv4); while (my $line = <DATA>) { chomp $line; my($key, $parameter_value) = split("=", $line); if (is_ipv4($parameter_value)) { print $parameter_value; } else { print "Fail" } } print "\n"; __DATA__ abc=1.2.3.4

It prints "1.2.3.4". If you comment out the chomp line, it prints "Fail".

Maybe $parameter_value isn't what you think it is. Tip #2 from the Basic debugging checklist: print

my($key, $parameter_value) = split("=", $line); print ">>>$parameter_value<<<\n";