Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
thezip is randomly reminded of Hugo's_house_of_ho rrors
[LanX]: such much?

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (15)
As of 2017-03-24 18:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (305 votes). Check out past polls.