Randal L. Schwartz wrote:
"Rob" == Rob Dixon <[EMAIL PROTECTED]> writes:
Can anybody think of an elegant solution?
Rob> eval "qq($val)";
s/elegant/hacky, dangerous, broken/
Consider $val = "), $yourcode_here, (".
Old news, out of context, petulant.
Rob
--
To unsubscribe, e-mail: [EMAIL P
> "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes:
>> Can anybody think of an elegant solution?
Rob> eval "qq($val)";
s/elegant/hacky, dangerous, broken/
Consider $val = "), $yourcode_here, (".
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehe
Rob Dixon wrote:
>
> Peter Daum wrote:
>>
>> I am looking for an way to interpolate backslash-sequences
>> within a string with the usual perl semantics, e.g.
>> $s='1\t\2\t3\na\ b c' should become:
>> '123
>> a b c'
>>
>> Things I tried were for example
>> $s= eval('' . "$val"); # (hoping to trig
Peter Daum wrote:
> I am looking for an way to interpolate backslash-sequences
> within a string with the usual perl semantics, e.g.
> $s='1\t\2\t3\na\ b c' should become:
> '123
> a b c'
>
> Things I tried were for example
> $s= eval('' . "$val"); # (hoping to trigger the normal interpolation) or
Peter Daum wrote:
>
I am looking for an way to interpolate backslash-sequences
within a string with the usual perl semantics, e.g.
$s='1\t\2\t3\na\ b c' should become:
'123
a b c'
Things I tried were for example
$s= eval('' . "$val"); # (hoping to trigger the normal interpolation) or
$s=~ s/\\(.
On 11/3/06, Peter Daum <[EMAIL PROTECTED]> wrote:
I am looking for an way to interpolate backslash-sequences
within a string with the usual perl semantics
That's what eval does, although you have to build your string with
care. Don't let the user put their own data into that string; they can
(
Peter Daum am Freitag, 3. November 2006 20:26:
Hoi Peter,
> I am looking for an way to interpolate backslash-sequences
> within a string with the usual perl semantics, e.g.
> $s='1\t\2\t3\na\ b c' should become:
> '123
> a b c'
With usual perl semantics, the result is different :-)
> Things I t
I am looking for an way to interpolate backslash-sequences
within a string with the usual perl semantics, e.g.
$s='1\t\2\t3\na\ b c' should become:
'123
a b c'
Things I tried were for example
$s= eval('' . "$val"); # (hoping to trigger the normal interpolation) or
$s=~ s/\\(.)/"\\$1"/eg;
but some