in reply to Re: Parsing HTML into various files
in thread Parsing HTML into various files

For some reason, I am getting the following error. (I checked the file name this time.)

Can't call method "as_text" on an undefined value at C:\..\perl\treebu +ilder.pl line 29.

line 29

$rec{$tds[2]->as_text} = $tds[3]->as_text;

Sorry I couldn't get it to work right away.

Update: Wait, I think I see what might be making things hinky.

Update 2: I was working with the wrong batch of files, but even working with the right batch of files is causing the same error. I think it has something to do with the nested tables in some of the descriptions. For files without the nested tables, this works fine.

I am thinking that the following should go first with some way of having the tables within it written into the string it creates.

$rec{note} = $fields[6]->as_text; #put nested tables in this one. $rec{group} = $fields[0]->as_text; $rec{type} = $fields[1]->as_text;
Have a cookie and a very nice day!
Lady Aleena

Replies are listed 'Best First'.
Re^3: Parsing HTML into various files
by wfsp (Abbot) on Aug 26, 2010 at 09:25 UTC
    Ah, I only looked at the first file, I didn't realise some of the others had nested tables. It should be fairly straight forward to accomadate them. I may not have time to look at it today and I'm away for the weekend. I should be able to get back to it on Tuesday.