Bcoz of the Frontier cannot return multiple Hashes+Arrays at the same time, so I'm trying to put all arrays and hashes into one %Hash to return.

But, the Hash in Array in Hash doesn't recognized by Frontier,

$data->{content}[1];
should be a Hash ref insdead of a member of the parent array, but Frontier shows it as an array.


How can I force it to be an array?

the following is part of the code in my daemon side program:
#!/usr/bin/perl # # Project A - Parsing engine Template (PeT) # # Author: BlueT <BlueT@BlueT.org> # Since 2007/07 # one PeT for one site, # this Template is for extracting data from tables for specific site. use strict; use warnings; use Frontier::Daemon; my $listen_ip='127.0.0.1'; my $listen_port='5566'; my $d = Frontier::Daemon->new( methods => { extract => \&extract, }, LocalAddr => "$listen_ip", LocalPort => "$listen_port", ); sub extract { my %data = ( site_name => "site name", content => [ # array ref ( # this is [0], a hash ref handicap => [ 0, "asia", "BigSmall" ], A => [ "name", "asia_score", "BigSmall_score" ], B => [ "name", "asia_score", "BigSmall_score" ], ), ( # this is [1] handicap => [ 0, "asia", "BigSmall" ], A => [ "name", "asia_score", "BigSmall_score" ], B => [ "name", "asia_score", "BigSmall_score" ], ), ], ); return \%data; }


Part of my codes in client side is HERE.

The results' HERE.

And i'd reformated the packet content, shown
HERE.

/ BlueT = Matthew / / BlueT@BlueT.org / / Just be Perl Hacking! /

In reply to send $Hash{$array[%Hash]} using Frontier Question. by BlueT

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.