Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Looping through an array

by choroba (Cardinal)
on Sep 27, 2021 at 20:21 UTC ( [id://11137068]=note: print w/replies, xml ) Need Help??


in reply to Looping through an array

The contents of $DATA in not Perl, it looks like a JSON. There are modules to turn JSON into a Perl structure (e.g. Cpanel::JSON::XS).

Your code doesn't compile under strict. That's because $doc_data is declared only in the for loop, but you use it outside of it in the else part. Without strict, it runs, but doesn't output anything.

Please, try to post the actual code. Help us to help you.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found