in reply to IP address validation when IP is picked dynamically
is skipping the two first lines, whereas your IP address sits on the second line, so that the is_ipv4 subroutine never gets a chance to see it. Changing it to:next if $. < 2;
or something equivalent would solve this issue.next if $. <= 2;
Actually, rather than skipping lines, which is not very robust (your file might have a commented-out line at the top, who knows?), I would rather check if the extracted key matches IPADDR.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: IP address validation when IP is picked dynamically
by rahulruns (Scribe) on May 01, 2015 at 14:24 UTC | |
by fishmonger (Chaplain) on May 01, 2015 at 16:49 UTC | |
by rahulruns (Scribe) on May 26, 2015 at 04:14 UTC |