Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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; }

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
Node Status?
node history
Node Type: note [id://930075]
help
Chatterbox?
and the fog begins to lift...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2017-02-27 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (389 votes). Check out past polls.