pad ip address with leading zeros in perl script

JJB Barbish3 at adelphia.net
Thu Apr 29 06:18:45 PDT 2004


I have perl script written be someone else and I need to fill in the
each octal with leading zero if needed, so ip address can be sorted
on.

This must be an very common requirement.

Is there some standard perl module I can use to perform this task?
An sample of the perl code to accomplish this would be very helpful.
The ip address is already in $src_ip

Thanks





More information about the freebsd-questions mailing list