Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Converting some MapReduce PHP scripts to Perl

by regan99 (Initiate)
on Aug 12, 2011 at 22:06 UTC ( [id://920093]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    36dc0d7d0ac25ce60898c36ca135fbbd        [[12051,840,501,33],{"23602":2
    +2}]
    4c38528ffe96a15c90e8cfcaaad048e3        [[13308,124,-1,62],{"8002":12}
    +]
    ...
    d7af9cd8573ecbec6d42e453439e3e0f        [[4680,124,-1,63],{"1012":1896
    +}]
    d93adab6b345608d38ea84811012dce8        [[114,840,819,48],{"22502":322
    +,"8002":3}]
    ffd50dd8b4986f40634d6b5925dc04c6        [[6089,840,803,5],{"1252":1}]
    
  2. or download this
    #!/usr/bin/php
    
    ...
    {
            echo $key ."\t".  json_encode( array($key=>$value) ) ."\n";
    }
    
  3. or download this
    $value =& json_decode($value);
    $value[1] = get_object_vars($value[1]);
    
  4. or download this
    Input line:
    36dc0d7d0ac25ce60898c36ca135fbbd        {"36dc0d7d0ac25ce60898c36ca135
    +fbbd":[[12051,840,501,33],{"23602":22}]}
    
  5. or download this
    $value before the json_decode call : [[12051,840,501,33],{"23602":22}]
    
    ...
    (
        [23602] => 22
    )
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-19 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found