[Chicago-talk] Removing "." from a string?
Don Drake
don at drakeconsult.com
Thu Jan 31 07:16:26 PST 2008
#!/usr/bin/perl
my $ip='192.168.2.16';
$ip=~s/\.//g;
print $ip."\n";
-Don
--
Don Drake
www.drakeconsult.com
www.maillaunder.com
312-560-1574
800-733-2143
On Jan 31, 2008, at 9:13 AM, Richard Reina wrote:
> Does anyone know an easy way to remove "."s from a string like
> 192.168.2.16
>
> so I get 192168216? Substring seems cumbersome and does not account
> for length between dots.
>
> Thanks for any help.
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
More information about the Chicago-talk
mailing list