perl.beginners
[Top] [All Lists]

How to evaluate a raw string?

Subject: How to evaluate a raw string?
From: Manfred Lotz
Date: Sat, 04 Oct 2008 21:26:41 +0200
Newsgroups: perl.beginners


Hi all,

I like to specify a raw string, like for example $w:

my $who = "my friend";
my $w = q(This is \n $who.);


Now I want to evaluate that raw string so that the result is a string:
This is
my friend.


eval doesn't seem to help.


Actually I want to be able to specify a raw string where at the end of the day only variables get expanded.


Any idea how to do this?



--
Manfred


<Prev in Thread] Current Thread [Next in Thread>