in reply to File Searching
You have good solutions for splitting your string, but do you have to normalize your ip string? As a hash key '192.168.0.1' ne '192.168.000.001'. The following may help:
my $ip = '192.168.0.1'; (my $ip_norm = $ip) =~ s/(\d+)/sprintf "%03d", $1/ge; print "$ip | $ip_norm";
Prints:
192.168.0.1 | 192.168.000.001
|
|---|