Thanks a million.

Best Regards,
Pradeep

-----Original Message-----
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]
Sent: Friday, July 22, 2005 6:00 PM
To: Pradeep Goel (WT01 - TELECOM SOLUTIONS)
Cc: [email protected]
Subject: RE: Replacing printf by print

On Jul 22, [EMAIL PROTECTED] said:

> 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?

The only problem there might be is that print() is susceptible to to the

$, and $\ variables.  The $, variable defines what gets printed in
between
the list of strings you pass to print(), and $\ defines what gets
printed
after the strings you pass to print().  Both default to the empty
string,
but if you were to change them, for some reason, print()s output would
be
affected (but printf()s would not).

   print "a", "b", "c";  # abc

   $, = "!";
   print "a", "b", "c";  # a!b!c

   $\ = "?";
   print "a", "b", "c";  # a!b!c?

But this is not likely to happen, methinks.

--
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

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 [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to