Re: printf sprintf

2004-01-09 Thread david
R. Joseph Newton wrote: > All the use one could imagine. The printf function can print pretty much > anywhere. I believe that it preceded sprintf historically, but I wouldn't > swear > > Many C coders have told me that it is the most efficient way to > write files. huh? please explain why prin

Re: printf sprintf

2004-01-08 Thread R. Joseph Newton
Paul Kraus wrote: > What is the difference. The only I see is that printf can take a filehandle? > But what use would that be. All the use one could imagine. The printf function can print pretty much anywhere. I believe that it preceded sprintf historically, but I wouldn't swear to it. Many C

Re: printf sprintf

2004-01-08 Thread Wiggins d Anconia
> Wiggins D Anconia wrote: > > > > Notice the difference in the docs: > > > > printf FILEHANDLE FORMAT, LIST > > printf FORMAT, LIST > > > > In the first there is NO comma following the filehandle, this means it > > is interpreted in a different manner than the rest of the argument list, > > or p

Re: printf sprintf

2004-01-08 Thread Rob Dixon
Wiggins D Anconia wrote: > > Notice the difference in the docs: > > printf FILEHANDLE FORMAT, LIST > printf FORMAT, LIST > > In the first there is NO comma following the filehandle, this means it > is interpreted in a different manner than the rest of the argument list, > or probably to be more pre

Re: printf sprintf

2004-01-08 Thread Rob Dixon
Wiggins D Anconia wrote: > > Notice the difference in the docs: > > printf FILEHANDLE FORMAT, LIST > printf FORMAT, LIST > > In the first there is NO comma following the filehandle, this means it > is interpreted in a different manner than the rest of the argument list, > or probably to be more pre

RE: printf sprintf

2004-01-08 Thread Dan Muey
> > > What is the difference. The only I see is that printf can > > > > One difference is printf prints it's output and sprintf > returns it';s > value. > > > > printf ... > > my $formatted_goodies = sprintf ... > > > > > take a filehandle? But what use would that be. > > > > > > > To format

RE: printf sprintf

2004-01-08 Thread Wiggins d Anconia
> > What is the difference. The only I see is that printf can > > One difference is printf prints it's output and sprintf returns it';s value. > > printf ... > my $formatted_goodies = sprintf ... > > > take a filehandle? But what use would that be. > > > > To format the contents of it. For

Re: printf sprintf

2004-01-08 Thread Wiggins d Anconia
> > What is the difference. The only I see is that printf can take a filehandle? > But what use would that be. > The filehandle tells printf where to print the result, aka which filehandle, by default STDOUT. Which doesn't have a purpose with sprintf since it returns its value... http://dan

RE: printf sprintf

2004-01-08 Thread Dan Muey
> What is the difference. The only I see is that printf can One difference is printf prints it's output and sprintf returns it';s value. printf ... my $formatted_goodies = sprintf ... > take a filehandle? But what use would that be. > To format the contents of it. For instance, you might hav