Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Variable interpolation in a file to be read in

by Anonymous Monk
on Oct 06, 2011 at 22:38 UTC ( #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; }


Comment on Re: Variable interpolation in a file to be read in
Download Code
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
Node Status?
node history
Node Type: note [id://930075]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2014-09-02 10:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (21 votes), past polls