tobold.org

correct • elegant • free

△ comp.lang.perl △

◅ Directory name extraction

Converting from base 8 to base 2 ▻

Variable expansion in string

In article <4ern04$sqk@amy30.Stanford.EDU>,
Ian Burrell <iburrell@leland.Stanford.EDU> wrote:
>$test = '<title>$var</title>\n';
>. . .
>$var = 100;
># expand it here

    $expand = eval '"' . $test . '"';
or
    $expand = eval "\"$test\"";

Tim.
--
Tim Goodwin   | "Forget the mystical level numbers." -- Henry Spencer

Original headers:

From: tim@pipex.net (Tim Goodwin)
Newsgroups: comp.lang.perl.misc
Subject: Re: Variable expansion in string
Date: 2 Feb 1996 13:08:19 GMT
Organization: Unipalm PIPEX
Message-ID: <4et2c3$l2n@wave.news.pipex.net>
References: <4ern04$sqk@amy30.Stanford.EDU>

△ comp.lang.perl △

◅ Directory name extraction

Converting from base 8 to base 2 ▻