Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Apr 2004 09:08:05 -0400
From:      "JJB" <Barbish3@adelphia.net>
To:        "freebsd-questions@FreeBSD. ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   pad ip address with leading zeros in perl script 
Message-ID:  <MIEPLLIBMLEEABPDBIEGAEAOFNAA.Barbish3@adelphia.net>

next in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?MIEPLLIBMLEEABPDBIEGAEAOFNAA.Barbish3>