jaspreet_sethi5875 has asked for the wisdom of the Perl Monks concerning the following question:
Perl module HTML::Strip is returning blank values after parsing whereas valid values are expected. We are using perl 5.8.8 on CentOS release 5.7 (Final). In our script we are fetching around 25k records in a single go from DATABASE and parsing them with HTML::Strip and in the process around 4-6 records are becoming blank after parsing whereas in DATABASE they have a defined value(containing english phrases along with html tags).
Below is the part of the code:script starts ... ... ... While(25k to 50k records from DB) { my $field = ''; $field = $h->{'HTML_FIELD'} if(defined($h->{'HTML_FIELD'})); $field = &html_parsing($field) if($field); } sub html_parsing { my $raw_html = shift; my $hs = HTML::Strip->new(); my $string = $hs->parse( $raw_html ); ## Problem: here the $string is becoming blank after parsing. $hs->eof; return $string; } ... ... ... script ends
When we again check only for those 4-6 blank records through a sample script then after html parsing their values is as expected from DATABASE(not blank). Any help will be really appreciable.
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML::Strip returning blank value after parsing
by Anonymous Monk on Jan 16, 2013 at 10:50 UTC | |
by jaspreet_sethi5875 (Initiate) on Jan 16, 2013 at 12:09 UTC | |
by Anonymous Monk on Jan 16, 2013 at 13:35 UTC | |
by jaspreet_sethi5875 (Initiate) on Jan 16, 2013 at 16:57 UTC | |
by Anonymous Monk on Jan 16, 2013 at 17:30 UTC | |
by Anonymous Monk on Jan 16, 2013 at 12:41 UTC |