On Jul 22, 2005, at 14:00, Jeff 'japhy' Pinyan wrote:
On Jul 22, [EMAIL PROTECTED] said:
Does replacing printf by print make any difference in the program?
Especially at places where there is no format string passed or
just $_
is passed?
It probably doesn't have a noticeable difference unless you compare
the running of it many, MANY times. But using printf() needlessly
is silly, and in some cases, dangerous. If you have a % sign in
your string, printf will expect an argument to go with it.
Just for the record, another formal difference is that printf does
not add $\, which might not be a problem anyway.
I second the remark of japhy, be specific, use print when you mean
print.
-- fxn
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>