Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Converting scalar value to hash

by Anonymous Monk
on Sep 22, 2012 at 21:18 UTC ( #995133=note: print w/ replies, xml ) Need Help??


in reply to Re: Converting scalar value to hash
in thread Converting scalar value to hash

Well, judging from the subroutine name (sub handler) and the variable $r, I'm betting it's code running under mod_perl and $r is the HTTP request object.

What's the OP fails to state is how he expects his hash to print. One way or other he needs to serialise it (transform it into a string suitable for outputting). Perhaps Data::Dumper? Storable? But I can't imagine shoving a Perl-style hash to a client to be of much use. Perhaps he wants the hash in one of the markup formats such as XML or YAML or JSON instead?


Comment on Re^2: Converting scalar value to hash
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (13)
As of 2014-08-22 18:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (163 votes), past polls