Title: RE: spidering/crawling/scraping a site..
All,
 
Please disregard. It was another value not updating, and I've got it fixed. Thanks for your attention.
 
Joe
 

==============================================================
          Joseph P. Discenza, Sr. Programmer/Analyst
               mailto:[EMAIL PROTECTED]
 
          Carleton Inc.   http://www.carletoninc.com
          574.243.6040 ext. 300    fax: 574.243.6060
 
Providing Financial Solutions and Compliance for over 30 Years


From: [EMAIL PROTECTED] on behalf of Joe Discenza
Sent: Fri 28-Oct-05 14:17
To: perl-win32-users mailing list
Subject: eval'ing a dumped data structure

All,
 
I've got a dumped data structure. I can print the string I dumped to:
 
$form_hash_ary_ref = [
                       {
                         'desc' => 'Agreement to Provide Insurance',
                         'name' => 'AGREE_PPI.pdf',
                         'copies' => 1,
                         'field_hash' => {
                                           'INS_POLICY_NUM' => {
                                                                 'disp_only' => 1,
                                                                 'value' => 'cpsex1'
                                                               }
                                         }
                       }
                     ];
 
This is fine, and looks just like I expect. Then I eval the dumped string, so the variable $form_hash_ary_ref should contain that anonymous array (in the example, containing one anonymous hash).
 
I have a debug line right after the eval
 
    print DEBUG ref($form_hash_ary_ref), ": @{$form_hash_ary_ref}\n";

and it prints

ARRAY: HASH(0xd5bea64)
I expected the ARRAY (ref of a reference to an array), and then I suppose it prints the single element of the array, which is a hash ref.
 
Then I get to the next debug line
 
 @form_hash_ary = @$form_hash_ary_ref;
    print DEBUG scalar(@form_hash_ary), $form_hash_ary[0]{'field_hash'}{'INS_POLICY_NUM'}{'value'}, "\n" if ($debug && $next_form == -1);
This prints what I expect
 
1cpsex1
 
(Yeah, I should probably have put a space between them.)
 
But this next line crashes, and I can't figure out why (it's in ASP, and I'm not getting a Perl run-time error back, just a 500).
 
 my %my_hash = %{$form_hash_ary[$current_form]{'field_hash'}};
 
When I lift the chunk out into a console .pl file, hard-code the string to be eval'ed, everything works fine.
 
Any clues?
 
Joe
 

==============================================================
          Joseph P. Discenza, Sr. Programmer/Analyst
               mailto:[EMAIL PROTECTED]
 
          Carleton Inc.   http://www.carletoninc.com
          574.243.6040 ext. 300    fax: 574.243.6060
 
Providing Financial Solutions and Compliance for over 30 Years
 
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to