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

Re: PERL REST API Post script

by kcott (Archbishop)
on Feb 11, 2020 at 07:44 UTC ( [id://11112761]=note: print w/replies, xml ) Need Help??


in reply to PERL REST API Post script

G'day ptone,

Welcome to the Monastery.

Building upon what ++hippo pointed out, consider using qq for your outermost quotes.

You're currently producing JSON like this:

$ perl -E 'my $x = "YZ"; say q{{"X":"$x"}}' {"X":"$x"}

I expect you want JSON more like this:

$ perl -E 'my $x = "YZ"; say qq{{"X":"$x"}}' {"X":"YZ"}

— Ken

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-23 22:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found