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.

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]



Reply via email to