Populating string (scalar)

2001-06-28 Thread Rajeev Rumale

Hi

I need to assign a long multiline string value to a scalar.

I would like to know a way where  i can assing a string value to a scalar
with inserting the escape char(\).  something similar to what we do with
print

print  label;

.title $title./title.
..
label

Here we need not escape the / char in /title;
Can we use any similar method to assing a value to any scalar,

Sorry if I am asking a stupid question.

with regards

Rajeev Rumale

~~~
Rajeev Rumale
MyAngel.Net Pte Ltd.,Phone  :
(65)8831530 (office)
#04-01, 180 B, The Bencoolen,   Email  :
[EMAIL PROTECTED]
Bencoolen Street, Singapore - 189648 ICQ: 121001541
Website : www.myangel.net
~~~





- Original Message -
From: Nick Transier [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 10:50 PM
Subject: Incrementing Strings


 If I define a variable as a string
 my $var = a;

 I can get the increment to work
 print ++$var; -- prints b

 but the decrement
 print --$var -- prints -1

 Why? and how can I decrement it?


 Thanks,
 -Nick
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com






Re: Populating string (scalar)

2001-06-28 Thread Paul Johnson

On Thu, Jun 28, 2001 at 04:42:08PM +0800, Rajeev Rumale wrote:
 Hi
 
 I need to assign a long multiline string value to a scalar.
 
 I would like to know a way where  i can assing a string value to a scalar
 with inserting the escape char(\).  something similar to what we do with
 print
 
 print  label;
 
 .title $title./title.
 ..
 label

How about

my $var =  label;

.title $title./title.
..
label

:-)

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net