Try:

print "abc${string}zyx\n";

or

print "abc".$string."zyx\n";

Cheers
Andy
-----Original Message-----
From: Sureshkumar M (HCL Financial Services)
[mailto:[EMAIL PROTECTED] 
Sent: 10 November 2008 15:34
To: beginners@perl.org
Subject: String concatination.


>Hi all,
>I have a string like below.
>$string="ABCD";

>While printing , I have to include some extra strings in prefix and
>suffix of the string....like below...

>abcABCDxyz
>how do I do this.....? 

>actually I tried like below......
>print "abc$sting\xyz";
>But It's not coming as like I expected(abcABCDxyz)

Capgemini is a trading name used by the Capgemini Group of companies which 
includes Capgemini UK plc, a company registered in England and Wales (number 
943935) whose registered office is at No. 1 Forge End, Woking, Surrey, GU21 6DB.
This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.


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


Reply via email to