Re: sprintf and printf in Perl
- From: "Paul Lalli" <mritty@xxxxxxxxx>
- Date: 14 Sep 2006 08:42:57 -0700
Chen Li wrote:
I want to print out a AoA. If I use printf I get what
I expect. If I use sprintf for string I get error
messages
What is making you think that printf() and sprintf() can be used
interchangably?
but the remaining still look OK. But If use
sprintf also for numbers I get nothing only error
messages. I look at the POD. It looks like sprintf and
printf are changeable to me.
WHAT part of the POD says that?
perldoc -f printf
printf FILEHANDLE FORMAT, LIST
printf FORMAT, LIST
Equivalent to "print FILEHANDLE sprintf(FORMAT,
LIST)", except that "$\" (the output record
separator) is not appended.
Any comments?
What about the above makes you think that you can replace printf with
sprintf or vice-versa?
Paul Lalli
.
- References:
- sprintf and printf in Perl
- From: Chen Li
- sprintf and printf in Perl
- Prev by Date: Re: Archive::Zip and hash issues
- Next by Date: Re: Archive::Zip and hash issues
- Previous by thread: Re: sprintf and printf in Perl
- Next by thread: Archive::Zip and hash issues
- Index(es):
Relevant Pages
|