|
|
| We don't bite newbies here... much | |
| PerlMonks |
Interpolating variables in JSON stringby j0se (Monk) |
| on Jan 29, 2013 at 11:25 UTC ( #1015856=perlquestion: print w/ replies, xml ) | Need Help?? |
|
j0se has asked for the
wisdom of the Perl Monks concerning the following question:
Hello Monks,
I am authenticating through Rackspace API with the following code (using LWP):
The problem is that I am not able to interpolate the variables in JSON string ($USERNAME and $API_KEY) - I am getting 400 BadRequest response. I have tried quotemeta (in the code snippet above), \Q and \E operators, escaping JSON double quotes with \. The commented out $json line (with hard-coded credentials) works just fine. We are what we repeatedly do. Excellence, then, is not an act but a habit. -- Will Durant (Aristotle)
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||