> -----Original Message-----
> From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 05, 2003 3:21 PM
> To: [EMAIL PROTECTED]
> Subject: Re: printf? RE: help building hash on-the-fly?
> 
> 
> I'm going to venture a guess here. Its probably because he 
> needed the number printed as a 
> 3-digit number padded with zeroes, which print can't do.

To pad with zeroes, use %03d.  %3d pads with spaces.

-Mark

> 
> McMahon, Chris wrote:
> > Hi Wags...
> >     So now an idle style question, if you don't mind...
> > 
> >     This syntax seems pretty obscure to me (I had to look 
> up what printf
> > was doing): 
> > 
> > printf "%3d $file\n", $MyId++;
> > 
> >     It's efficient and all, but isn't this more readable 
> for the same
> > number of characters? 
> > 
> > print "$MyId $file\n"; 
> > $MyId++; 
> > 
> >     I just wondered why you like printf in this circumstance. 
> 
> -- 
> Andrew Gaffney
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to