Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 romping around the Monastery: (7)
As of 2015-07-04 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls