Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Really literal ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 10789 of 11989
Post > Topic >>

Really literal string

by yingun@[EMAIL PROTECTED] (Keenlearner) Mar 25, 2008 at 09:01 AM

I like to store multiline perl code inside a scalar variable, but I
don't want perl to interpolate the variable inside the code.

my $t = "abc";

my $s = <<TEXT;
This is a test $t
TEXT

The above code still interpolate the string. I know that I can escape
the variable with backslash, but the code inside is much more
complicated than that as the would be subroutine as well. Any method
that I can use ? Thank you.
 




 6 Posts in Topic:
Really literal string
yingun@[EMAIL PROTECTED]   2008-03-25 09:01:37 
Re: Really literal string
Jenda@[EMAIL PROTECTED]   2008-03-25 17:57:32 
Re: Really literal string
noreply@[EMAIL PROTECTED]  2008-03-25 18:01:35 
Re: Really literal string
rob.dixon@[EMAIL PROTECTE  2008-03-25 16:49:52 
Re: Really literal string
chas.owens@[EMAIL PROTECT  2008-03-25 12:50:44 
Re: Really literal string
noreply@[EMAIL PROTECTED]  2008-03-25 18:25:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 10:24:03 CDT 2008.