On Feb 6, Balaji Thoguluva said:

>Thanks Tim Johnson. I removed the /r/n from the reg-ex and it works. I
>have another question. How to assign a multiline string or string having
>many lines(strings having \n) to a $string-variable?. In C, there is a
>"\" operator.

You don't need to do anything special in Perl.

$string = "This is a
very long string
that spans
many lines";

Or you can use a 'here-doc'.
$string = << "END OF STRING";
this is a very
long string that
spans many lines
END OF STRING


-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


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