Good morning to all monks
and thank you for the help you gave me in other posts (i'm new to this forum, not easy to find old posts...)
i've some questions about HTML::TableExtract
i'm trying to get some informations from ad html file.
I have been able to get the exact table that i want to capture but i'm not able to get
every single cell (because i have to manipulate the text of every cell of the table)
This is the code i wrote
##########################################################
use strict;
use warnings;
use HTML::TableExtract;
my $headers = ['Col1_name', 'Col2_name', 'Col2_name'];
my $table_extract = HTML::TableExtract->new(headers => $headers);
$table_extract->parse_file('file.html');
my ($table) = $table_extract->tables;
my $i=0;
for my $rox ($table->rows)
{
print join(',' , @$rox), "\n";
}
##########################################################
now, if i run this code, i have as result the content of the table but
"all toghether" while what i want to do is examinate the content of every cell,
removing whatever i don't want and save the result
For example:
i have a table of 3 columns and 3 rows (9 cells total)
1)This cell contain "Limner (Carriage Return) other text "
2)This cell contain "carrots (Carriage Return) onion (Carriage Return) other text "
3)This cell contain "dagger"
4)This cell contain "Autolicos"
5)This cell contain "one statue (Carriage Return) one diamond "
6)This cell contain "sword (Carriage Return) sword "
7)This cell contain "Leimir "
8)This cell contain "one onion (Carriage Return) 900 other text"
9)This cell contain "bow "
Now that i want is to examinate every cell, one by one, remove all the text from
(carriage return) and put the result in a variable in order to save everithin
in a file that should be like this:
Limner;Carrots;Dagger
Autolicos;one statue;sword
Leimir;One onion;bow
Any help?
thanks in advance
Limner