$data->{content}[1]; #### #!/usr/bin/perl # # Project A - Parsing engine Template (PeT) # # Author: BlueT # 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; }