in reply to does split(".") work?
OUTPUTuse strict; use warnings; my $ip="158.21.17.45"; my @values = split(/\./, $ip); #<----Notice the Regex. print $ip,"\t\t",$#values,"\n"; for my $val (@values){ print "$val\n"; } exit(0);
Note:, Coincided with Joost's reply, we replied at the same time.158.21.17.45 3 158 21 17 45
|
|---|