Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Variable interpolation in a file to be read in

by Anonymous Monk
on Oct 06, 2011 at 22:38 UTC ( [id://930075]=note: print w/replies, xml ) Need Help??


in reply to Variable interpolation in a file to be read in

You can always use eval if the text does not contains any other characters that double quoted strings handle specially (e.g. ['%@])

if (($begin_sql == 1) && ($end_sql != 1)) { my $interpolated = eval(qq/$_/); $sql .= $interpolated; }

Replies are listed 'Best First'.
Re^2: Variable interpolation in a file to be read in
by Anonymous Monk on Oct 07, 2011 at 02:43 UTC

    You can always use eval

    You can always avoid eval :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://930075]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-18 07:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found