Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: String interpolation

by edan (Curate)
on Dec 09, 2004 at 13:09 UTC ( [id://413520]=note: print w/replies, xml ) Need Help??


in reply to String interpolation

I think the easiest solution is using the dreaded string eval:

for my $idx (0..10) { my $interp_str; eval "\$interp_str = qq($str)"; do_something($interp_str); }

All the usual caveats about untainting user inputs apply, of course.

--
edan

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-03-19 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found