| Pradeep Goel 2005-07-24, 8:29 pm |
|
That's the whole problem.=0D
I am replacing it since there are some % sign in the strings being
passed making the program crash. Replacement solves the problem as such,
but wanted to countercheck, If these replacements could create any
problem anywhere else! , or lator in the program?
(Although I don't think it should).
Thanks and regards,
Pradeep
-----Original Message-----
From: Jeff 'japhy' Pinyan [mailto:japhy@perlmonk.org]=0D
Sent: Friday, July 22, 2005 5:31 PM
To: Pradeep Goel (WT01 - TELECOM SOLUTIONS)
Cc: beginners@perl.org
Subject: Re: Replcaing printf by print
On Jul 22, pradeep.goel@wipro.com 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=0D
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=0D
will expect an argument to go with it.
--=0D
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % the cheated, we who for every service
http://japhy.perlmonk.org/ % have long ago been overpaid?
http://www.perlmonks.org/ % -- Meister Eckhart
Confidentiality Notice=0D
The information contained in this electronic message and any attachments to=
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or=
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or=
Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.
|