For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > July 2005 > Re: [SPAM DETECT] Re: Replcaing printf by print









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SPAM DETECT] Re: Replcaing printf by print
Xavier Noria

2005-07-24, 8:29 pm

On Jul 22, 2005, at 14:00, Jeff 'japhy' Pinyan wrote:

> On Jul 22, pradeep.goel@wipro.com said:
>
>
>
> 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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com