On Wednesday, September 24, 2003, at 03:04 pm, Simon Wistow wrote:


On Wed, Sep 24, 2003 at 12:32:24PM +0000, Martin Bower said:
Can anyone point me inthe right direction, on how to get variable names
stored in __DATA__ to be evaluated ?

you could do something like


    my $data = join "", <DATA>;
    eval "\$date = \"$data\";";

which is icky but works

Doesn't work when $data contains any double quotes.


Ideally, perl would have an evalqq function to do this sort of thing.




Reply via email to