Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Escape $ in JSON::XS decoded

by haukex (Archbishop)
on Oct 16, 2020 at 20:38 UTC ( [id://11122922]=note: print w/replies, xml ) Need Help??


in reply to Escape $ in JSON::XS decoded

The string as you've shown in your (I assume) Data::Dumper output is the two characters $ and t, and {'$t'} is the correct way to access the hash entry whose key is that two-character string. The string '\$t' consists of three characters, \, $ and t, because backslashes in single-quoted strings work differently than in double-quoted strings - see Quote and Quote like Operators. You don't need to escape $ in a single-quoted string.

I am trying to get the Feed Updated value, this gives me the current time, and not the time value of 2019-07-19

Sorry, this doesn't make sense to me. Based on what you've shown here, there is no way that accessing the key differently would give you a different value. I suspect the data structure actually contains the value it's showing you. If you continue to have trouble, please provide a Short, Self-Contained, Correct Example that reproduces the isse.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-03-29 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found