roc has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,
sub bee_global_symbolics{ sub bee_global_symbolics{ my ($dbinfo,$process_id,$process_step_seq,$as_of_date,$process_executi +on_id, $sourcedir,$rootdir,$system_id,$global_files_flag)=@_; print $process_id,$process_step_seq,$global_files_flag; my $rc=SUCCESS; my ($msg,$msg_txt); #messenger is an 'our' object ref declared in bee_main +.pl #set caller so that all written msgs will have prefix +of Extract $Messenger->set_caller("Load Symbolics"); $msg_txt="bee_global_symbolics.pm started"; $Messenger->write_message($msg_txt,'I'); my @symbolics = &get_global_symbolics($dbinfo,$process_id,$process_ste +p_seq); my ($symbolic_name,$symbolic_flag,$source_sql) = @symbolics; print "$symbolic_name\n"; print "$symbolic_flag\n"; $sth1=$dbinfo->{'dbh'}->prepare("$source_sql"); if ( $sth1->execute ) { $dbinfo->{'oraerr'} = "Error Executing sql : >$DBI::errstr<"; } @valuelist = $sth1->fetchrow_array(); $sth1->finish;
values are the multiple values with a single key name like process_name as a key and linux,unix are the values assigned to that particular key.

till here i have done now and have to set those values as global by using tie::hash module or any module.

Replies are listed 'Best First'.
Re: html to text file
by Popcorn Dave (Abbot) on Feb 28, 2008 at 19:38 UTC
    I've used HTML::TokeParser to parse regular HTML pages but I think you might want to look at HTML::TableExtract for what you're after.


    Revolution. Today, 3 O'Clock. Meet behind the monkey bars.

    I would love to change the world, but they won't give me the source code

Re: html to text file
by Akoya (Scribe) on Feb 28, 2008 at 18:39 UTC
    Please set reasonable column widths on your example table, and wrap your code in <code> ... </code> tags. Your question is somewhat painful to look at.
Re: html to text file
by mr_mischief (Monsignor) on Feb 28, 2008 at 23:05 UTC
    This smells of a classroom assignment. I sure hope it is, and that you're not leaking actual financial data from an actual company.

    If your goal is to get a text-only output, consider using lynx to do a text-only page dump or a command-line tool like any of the various tools named 'html2txt'. The work's been done before, and unless you're turning something in as your own work, let other people's work be a starting point.

    A look using your favorite search engine for the term 'html2txt' will find many versions of tools named that way by many authors for many platforms in a handful of languages. There are even a few in Perl, although I'd advise against plagiarism if you're doing homework.