Article View: comp.lang.perl.misc
Article #328Re: Perl script question for gurus
From: Bart Lateur
Date: Thu, 11 Sep 1997 00:00
Date: Thu, 11 Sep 1997 00:00
23 lines
1491 bytes
1491 bytes
lparillo@newshost.li.net (Parillo) wrote:
>Will you have to do a printf in order to get the leading zeros?
What's wrong with sprintf (not printf)? Except that it's cryptic for
non-C programmers! ;-)
You can also use this:
$_ = substr("0" x $count . $number, -$count);
>BTW, the perldoc on printf and sprintf is not helpful to non-c
>programmners. Is there a better source (other than deja news?)
The POD's used to be crap for this. They referred to the documentation
for "C"! Aaaarghh!!!
But, I must say, the latest updates for PERLFUNC.POD have improved a
lot. Now they do contain all the basic info. Thanks guys!
Bart.
Technical Details
Message-ID:
<341db6ec.6181589@news.tornado.be>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<Pine.SOL.3.96.970825153417.22465A-100000@purple.tmn.com> <yd8u3g8lq0c.fsf@hoshi.engr.sgi.com> <340A846C.D6A042C8@microtec.de> <5v77us$gc$1@news01.li.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa0ae,bbbaaa795486a906 X-Google-Attributes: gidfa0ae,public X-Google-Thread: 112333,bbbaaa795486a906 X-Google-Attributes: gid112333,public X-Google-Thread: 1133f4,bbbaaa795486a906 X-Google-Attributes: gid1133f4,public From: bart.mediamind@tornado.be (Bart Lateur) Subject: Re: Perl script question for gurus Date: 1997/09/11 Message-ID: <341db6ec.6181589@news.tornado.be> X-Deja-AN: 271572533 References: <Pine.SOL.3.96.970825153417.22465A-100000@purple.tmn.com> <yd8u3g8lq0c.fsf@hoshi.engr.sgi.com> <340A846C.D6A042C8@microtec.de> <5v77us$gc$1@news01.li.net> X-Complaints-To: usenet@tornix.tornado.be X-Trace: tornix.tornado.be 873989080 12506 (None) 194.149.67.133 Organization: MediaMind Newsgroups: comp.lang.perl.misc,de.comp.lang.perl,fr.comp.lang.perl