weird issue with HTML::TokeParser and Fork
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.perl.misc Profile…
 Up
weird issue with HTML::TokeParser and Fork         


Author: arik
Date: May 3, 2008 16:58

I wrote a script that scrape information off staples.com and I'm
getting different results if I run it stand alone or I fork the
script.
running the script stand alone I get the expected results and when
forking the script it seems like it ignores the tag. any help<br /> is appreciated:<br /> this is part of the script:<br /> sub GetStaples {<br /> my $oem_PN = $_[0];<br /> my $ItemDesc = $_[1];<br /> my @ItemDesc = split(',',$ItemDesc);<br /> my $Item;<br /> my $price;<br /> my $description;<br /> my $type;<br /> my $title;<br /> my $numofitems;<br /> my $agent = WWW::Mechanize->new(autocheck => 1, cookie_jar =><br /> undef);<!-- google_ad_section_end --></div> </div> </td></tr> <tr><td align="left"><a id="msglnk_81352751" class="rose_10" href="javascript: sM('comp.lang.perl.misc',81352751);">Show full article (1.66Kb)</a> </td></tr> <tr><td align="left"><script type="text/javascript"><!-- google_ad_client = "pub-6591711875724720"; /* nnseek-center 300x250 */ google_ad_slot = "5182235189"; google_ad_width = 300; google_ad_height = 250; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "FC9902"; google_color_url = "003399"; google_color_text = "000000"; google_ui_features = "rc:6"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></td></tr> <tr><td align="right"><span class="rose_10"> <b>4</b> Comments</span></td></tr> </table> </td></tr> <tr><td align="center"><img src="http://www.nnseek.com/img/razdel.gif"><img src="http://www.nnseek.com/img/b.gif" width="93%" height="1px"></td></tr> <tr><td align="center" valign="top"> <table width="93%" cellpadding="0" cellspacing="10" border="0" style="margin: 0 0 0 2;"> <tr><td align="left" class="text"> <table cellspacing="0" cellpadding="0" border="0"> <tr valign="middle" class="text"> <td><a href="http://www.nnseek.com/e/comp.lang.perl.misc/weird_issue_with_html_tokeparser_and_fork_81353519m.html" class="title" title="Re: weird issue with HTML::TokeParser and Fork"><!-- google_ad_section_start -->Re: weird issue with HTML::TokeParser and Fork<!-- google_ad_section_end --></a></td> <td>  </td> <td><a id="lnk_81353519" href="javascript: sH('comp.lang.perl.misc',81353519);" title="show raw header"><img id="rhi_81353519" src="http://www.nnseek.com/img/open.gif" border="0" align="bottom"></a></td> <td> </td> <td><a id="cnt_81353519" href="javascript: sC('comp.lang.perl.misc',81353519);" title="quick contact us (Spam/Bad Encoding/Copyright Voilation/Inappropriate-Abuse/Privacy Voilation)"><img id="cnti_81353519" src="http://www.nnseek.com/img/open_scf.gif" border="0" align="bottom"></a></td> <td> </td> <td><a href="http://www.nnseek.com/weird-issue-with-HTML-TokeParser-and-Fork_s.html" title="Search weird issue with HTML TokeParser and Fork in Newsgroups with NNSeek"><img border="0" src="http://www.nnseek.com/img/16.ico"></a></td> <td> </td> <td><a href="http://boardreader.com/s/weird issue with HTML TokeParser and Fork.html?aaid=1473" title="Search weird issue with HTML TokeParser and Fork in boards with BoardReader"><img border="0" src="http://boardreader.com/images/favicon.gif"></a></td> </tr> </table></br> <div id="sC1_81353519" style="width:100%"><div style="width:100%; display:none" id="sC_81353519"></div></div> <div id="el1_81353519" style="width:100%; overflow:auto"><div style="width:100%; display:none" id="el_81353519"></div></div></br> <span class="rose_10"><b>Author:</b> <a class="link" href="http://www.nnseek.com/a/APK254182mfDp/Ben Bullock/">Ben Bullock</a><span id="at81353519" style="display:none">Ben Bullock</span></span></br> <span class="rose_10"><b>Date:</b> <span id="ts81353519">May 3, 2008 17:09</span></span></br></br> <div style="width:100%; overflow:auto; display:none" id="ab_n81353519" ></div> <div style="width:100%; overflow:auto;" id="ab81353519" > <div id="ab81353519_0" class=""><!-- google_ad_section_start -->On Sat, 03 May 2008 16:58:46 -0700, arik wrote:<br /> <!-- google_ad_section_end --></div> <div id="ab81353519_1" class="color1"><!-- google_ad_section_start -->> $title = $stream->get_trimmed_text("/title"); <!-- google_ad_section_end --></div> <div id="ab81353519_2" class=""><!-- google_ad_section_start --> ^^^^^^<!-- google_ad_section_end --></div> <div id="ab81353519_3" class="color1"><!-- google_ad_section_start -->> print "Title:".$tile."\n";<!-- google_ad_section_end --></div> <div id="ab81353519_4" class=""><!-- google_ad_section_start --> ^^^^^<br /> use warnings;<br /> use strict;<!-- google_ad_section_end --></div> </div> </td></tr> <tr><td align="left"> </td></tr> <tr><td align="left"><script type="text/javascript"><!-- google_ad_client = "pub-6591711875724720"; /* nnseek-center-2 300x250 */ google_ad_slot = "9367481979"; google_ad_width = 300; google_ad_height = 250; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "FC9902"; google_color_url = "003399"; google_color_text = "000000"; google_ui_features = "rc:6"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></td></tr> <tr><td align="right"><span class="rose_10">no comments</span></td></tr> </table> </td></tr> <tr><td align="center"><img src="http://www.nnseek.com/img/razdel.gif"><img src="http://www.nnseek.com/img/b.gif" width="93%" height="1px"></td></tr> <tr><td align="center" valign="top"> <table width="93%" cellpadding="0" cellspacing="10" border="0" style="margin: 0 0 0 2;"> <tr><td align="left" class="text"> <table cellspacing="0" cellpadding="0" border="0"> <tr valign="middle" class="text"> <td><a href="http://www.nnseek.com/e/comp.lang.perl.misc/weird_issue_with_html_tokeparser_and_fork_81484591m.html" class="title" title="Re: weird issue with HTML::TokeParser and Fork"><!-- google_ad_section_start -->Re: weird issue with HTML::TokeParser and Fork<!-- google_ad_section_end --></a></td> <td>  </td> <td><a id="lnk_81484591" href="javascript: sH('comp.lang.perl.misc',81484591);" title="show raw header"><img id="rhi_81484591" src="http://www.nnseek.com/img/open.gif" border="0" align="bottom"></a></td> <td> </td> <td><a id="cnt_81484591" href="javascript: sC('comp.lang.perl.misc',81484591);" title="quick contact us (Spam/Bad Encoding/Copyright Voilation/Inappropriate-Abuse/Privacy Voilation)"><img id="cnti_81484591" src="http://www.nnseek.com/img/open_scf.gif" border="0" align="bottom"></a></td> <td> </td> <td><a href="http://www.nnseek.com/weird-issue-with-HTML-TokeParser-and-Fork_s.html" title="Search weird issue with HTML TokeParser and Fork in Newsgroups with NNSeek"><img border="0" src="http://www.nnseek.com/img/16.ico"></a></td> <td> </td> <td><a href="http://boardreader.com/s/weird issue with HTML TokeParser and Fork.html?aaid=1473" title="Search weird issue with HTML TokeParser and Fork in boards with BoardReader"><img border="0" src="http://boardreader.com/images/favicon.gif"></a></td> </tr> </table></br> <div id="sC1_81484591" style="width:100%"><div style="width:100%; display:none" id="sC_81484591"></div></div> <div id="el1_81484591" style="width:100%; overflow:auto"><div style="width:100%; display:none" id="el_81484591"></div></div></br> <span class="rose_10"><b>Author:</b> <a class="link" href="http://www.nnseek.com/a/APK363013mfDp/Bart Lateur/">Bart Lateur</a><span id="at81484591" style="display:none">Bart Lateur</span></span></br> <span class="rose_10"><b>Date:</b> <span id="ts81484591">May 5, 2008 11:50</span></span></br></br> <div style="width:100%; overflow:auto; display:none" id="ab_n81484591" ></div> <div style="width:100%; overflow:auto;" id="ab81484591" > <div id="ab81484591_0" class=""><!-- google_ad_section_start -->Ben Bullock wrote:<br /> <!-- google_ad_section_end --></div> <div id="ab81484591_1" class="color1"><!-- google_ad_section_start -->>On Sat, 03 May 2008 16:58:46 -0700, arik wrote:<br /> ><!-- google_ad_section_end --></div> <div id="ab81484591_2" class="color2"><!-- google_ad_section_start -->>> $title = $stream->get_trimmed_text("/title"); <!-- google_ad_section_end --></div> <div id="ab81484591_3" class="color1"><!-- google_ad_section_start -->> ^^^^^^<!-- google_ad_section_end --></div> <div id="ab81484591_4" class="color2"><!-- google_ad_section_start -->>> print "Title:".$tile."\n";<!-- google_ad_section_end --></div> <div id="ab81484591_5" class="color1"><!-- google_ad_section_start -->> ^^^^^<br /> >use warnings;<br /> >use strict;<!-- google_ad_section_end --></div> <div id="ab81484591_6" class=""><!-- google_ad_section_start --><br /> This guy posted the exact same question on Perlmonks, and,<br /> unsurprisingly, got the exact same reply (second rekly, by ikegami).<br /> <br /> <a href="http://perlmonks.org/?node_id=684388" rel="nofollow" class="url" target="_blank">http://perlmonks.org/?node_id=684388</a><br /> <br /> I hate it when people are multiposting the same question all over, and<br /> are simply not paying attention to the replies.<br /> <br /><!-- google_ad_section_end --></div> <div id="ab81484591_7" class="signature"><!-- google_ad_section_start -->-- <br /> Bart.<!-- google_ad_section_end --></div> </div> </td></tr> <tr><td align="left"> </td></tr> <tr><td align="right"><span class="rose_10">no comments</span></td></tr> </table> </td></tr> <tr><td align="center"><img src="http://www.nnseek.com/img/razdel.gif"><img src="http://www.nnseek.com/img/b.gif" width="93%" height="1px"></td></tr> <tr><td align="center" valign="top"> <table width="93%" cellpadding="0" cellspacing="10" border="0" style="margin: 0 0 0 2;"> <tr><td align="left" class="text"> <table cellspacing="0" cellpadding="0" border="0"> <tr valign="middle" class="text"> <td><a href="http://www.nnseek.com/e/comp.lang.perl.misc/weird_issue_with_html_tokeparser_and_fork_81503791m.html" class="title" title="Re: weird issue with HTML::TokeParser and Fork"><!-- google_ad_section_start -->Re: weird issue with HTML::TokeParser and Fork<!-- google_ad_section_end --></a></td> <td>  </td> <td><a id="lnk_81503791" href="javascript: sH('comp.lang.perl.misc',81503791);" title="show raw header"><img id="rhi_81503791" src="http://www.nnseek.com/img/open.gif" border="0" align="bottom"></a></td> <td> </td> <td><a id="cnt_81503791" href="javascript: sC('comp.lang.perl.misc',81503791);" title="quick contact us (Spam/Bad Encoding/Copyright Voilation/Inappropriate-Abuse/Privacy Voilation)"><img id="cnti_81503791" src="http://www.nnseek.com/img/open_scf.gif" border="0" align="bottom"></a></td> <td> </td> <td><a href="http://www.nnseek.com/weird-issue-with-HTML-TokeParser-and-Fork_s.html" title="Search weird issue with HTML TokeParser and Fork in Newsgroups with NNSeek"><img border="0" src="http://www.nnseek.com/img/16.ico"></a></td> <td> </td> <td><a href="http://boardreader.com/s/weird issue with HTML TokeParser and Fork.html?aaid=1473" title="Search weird issue with HTML TokeParser and Fork in boards with BoardReader"><img border="0" src="http://boardreader.com/images/favicon.gif"></a></td> </tr> </table></br> <div id="sC1_81503791" style="width:100%"><div style="width:100%; display:none" id="sC_81503791"></div></div> <div id="el1_81503791" style="width:100%; overflow:auto"><div style="width:100%; display:none" id="el_81503791"></div></div></br> <span class="rose_10"><b>Author:</b> <a class="link" href="http://www.nnseek.com/a/APK254182mfDp/Ben Bullock/">Ben Bullock</a><span id="at81503791" style="display:none">Ben Bullock</span></span></br> <span class="rose_10"><b>Date:</b> <span id="ts81503791">May 5, 2008 17:25</span></span></br></br> <div style="width:100%; overflow:auto; display:none" id="ab_n81503791" ></div> <div style="width:100%; overflow:auto;" id="ab81503791" > <div id="ab81503791_0" class=""><!-- google_ad_section_start -->On Mon, 05 May 2008 20:50:23 +0200, Bart Lateur wrote:<br /> <!-- google_ad_section_end --></div> <div id="ab81503791_1" class="color1"><!-- google_ad_section_start -->> This guy posted the exact same question on Perlmonks, and,<br /> > unsurprisingly, got the exact same reply (second rekly, by ikegami).<br /> > <br /> > <a href="http://perlmonks.org/?node_id=684388" rel="nofollow" class="url" target="_blank">http://perlmonks.org/?node_id=684388</a><br /> > <br /> > I hate it when people are multiposting the same question all over, and<br /> > are simply not paying attention to the replies.<!-- google_ad_section_end --></div> <div id="ab81503791_2" class=""><!-- google_ad_section_start --><br /> According to the times on the posts, arik / arikamir posted his question <br /> here via Google Groups at about 12.00 midnight UTC (17.00 his time), then <br /> got an answer from me twenty minutes later (9.20 in the morning my time), <br /> then three and a half hours after I'd posted an answer, apparently <br /> ignoring the answer I'd posted, he went to Perl monks and posted the same <br /> question there.<!-- google_ad_section_end --></div> </div> </td></tr> <tr><td align="left"> </td></tr> <tr><td align="right"><span class="rose_10">no comments</span></td></tr> </table> </td></tr> <tr><td align="center"><img src="http://www.nnseek.com/img/razdel.gif"><img src="http://www.nnseek.com/img/b.gif" width="93%" height="1px"></td></tr> <tr><td align="center"> <script type="text/javascript"><!-- google_ad_client = "pub-6591711875724720"; /* nnseek-links 728x15 */ google_ad_slot = "3812424762"; google_ad_width = 728; google_ad_height = 15; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "FC9902"; google_color_url = "003399"; google_color_text = "000000"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></td></tr> <tr><td align="center"><img src="http://www.nnseek.com/img/razdel.gif"><img src="http://www.nnseek.com/img/b.gif" width="93%" height="1px"></td></tr> <tr><td align="center" valign="top"> <table width="93%" cellpadding="0" cellspacing="10" border="0" style="margin: 0 0 0 2;"> <tr><td align="left" class="text"> <table cellspacing="0" cellpadding="0" border="0"> <tr valign="middle" class="text"> <td><a href="http://www.nnseek.com/e/comp.lang.perl.misc/weird_issue_with_html_tokeparser_and_fork_81504303m.html" class="title" title="Re: weird issue with HTML::TokeParser and Fork"><!-- google_ad_section_start -->Re: weird issue with HTML::TokeParser and Fork<!-- google_ad_section_end --></a></td> <td>  </td> <td><a id="lnk_81504303" href="javascript: sH('comp.lang.perl.misc',81504303);" title="show raw header"><img id="rhi_81504303" src="http://www.nnseek.com/img/open.gif" border="0" align="bottom"></a></td> <td> </td> <td><a id="cnt_81504303" href="javascript: sC('comp.lang.perl.misc',81504303);" title="quick contact us (Spam/Bad Encoding/Copyright Voilation/Inappropriate-Abuse/Privacy Voilation)"><img id="cnti_81504303" src="http://www.nnseek.com/img/open_scf.gif" border="0" align="bottom"></a></td> <td> </td> <td><a href="http://www.nnseek.com/weird-issue-with-HTML-TokeParser-and-Fork_s.html" title="Search weird issue with HTML TokeParser and Fork in Newsgroups with NNSeek"><img border="0" src="http://www.nnseek.com/img/16.ico"></a></td> <td> </td> <td><a href="http://boardreader.com/s/weird issue with HTML TokeParser and Fork.html?aaid=1473" title="Search weird issue with HTML TokeParser and Fork in boards with BoardReader"><img border="0" src="http://boardreader.com/images/favicon.gif"></a></td> </tr> </table></br> <div id="sC1_81504303" style="width:100%"><div style="width:100%; display:none" id="sC_81504303"></div></div> <div id="el1_81504303" style="width:100%; overflow:auto"><div style="width:100%; display:none" id="el_81504303"></div></div></br> <span class="rose_10"><b>Author:</b> <a class="link" href="http://www.nnseek.com/a/APK3372361mfDp/arik/">arik</a><span id="at81504303" style="display:none">arik</span></span></br> <span class="rose_10"><b>Date:</b> <span id="ts81504303">May 5, 2008 17:51</span></span></br></br> <div style="width:100%; overflow:auto; display:none" id="ab_n81504303" ></div> <div style="width:100%; overflow:auto;" id="ab81504303" > <div id="ab81504303_0" class=""><!-- google_ad_section_start -->On May 5, 5:25 pm, Ben Bullock <benkasminbull...@<a href="http://gmail.com" rel="nofollow" class="url" target="_blank">gmail.com</a>> wrote:<!-- google_ad_section_end --></div> <div id="ab81504303_1" class="color1"><!-- google_ad_section_start -->> On Mon, 05 May 2008 20:50:23 +0200, Bart Lateur wrote:<!-- google_ad_section_end --></div> <div id="ab81504303_2" class="color2"><!-- google_ad_section_start -->>> This guy posted the exact same question on Perlmonks, and,<br /> >> unsurprisingly, got the exact same reply (second rekly, by ikegami).<!-- google_ad_section_end --></div> <div id="ab81504303_3" class="color1"><!-- google_ad_section_start -->><!-- google_ad_section_end --></div> <div id="ab81504303_4" class="color2"><!-- google_ad_section_start -->>> <a href="http://perlmonks.org/?node_id=684388" rel="nofollow" class="url" target="_blank">http://perlmonks.org/?node_id=684388</a><!-- google_ad_section_end --></div> <div id="ab81504303_5" class="color1"><!-- google_ad_section_start -->><!-- google_ad_section_end --></div> <div id="ab81504303_6" class="color2"><!-- google_ad_section_start -->>> I hate it when people are multiposting the same question all over, and<br /> >> are simply not paying attention to the replies.<!-- google_ad_section_end --></div> <div id="ab81504303_7" class="color1"><!-- google_ad_section_start -->><br /> > According to the times on the posts, arik / arikamir posted his question<br /> > here via Google Groups at about 12.00 midnight UTC (17.00 his time), then<br /> > got an answer from me twenty minutes later (9.20 in the morning my time),<br /> > then three and a half hours after I'd posted an answer, apparently<br /> > ignoring the answer I'd posted, he went to Perl monks and posted the...<!-- google_ad_section_end --></div> </div> </td></tr> <tr><td align="left"><a id="msglnk_81504303" class="rose_10" href="javascript: sM('comp.lang.perl.misc',81504303);">Show full article (1.07Kb)</a> </td></tr> <tr><td align="right"><span class="rose_10">no comments</span></td></tr> </table> </td></tr> <tr><td align="center">  </td></tr> </table> </td> <!-- End Middle --> </tr> </table> <!-- End Body --> </div><!-- Begin Footer --> <table width="100%" cellpadding="0" cellspacing="0" border="0" > <tr><td bgcolor="775A6E"><img src="http://www.nnseek.com/img/null.gif" height="2" width="100%"></td></tr> <tr><td bgcolor="D4C9C5"><img src="http://www.nnseek.com/img/null.gif" height="2" width="100%"></td></tr> <tr><td bgcolor="D4C9C5" align="center"><a href="http://clickaider.com/" title="Tracked by ClickAider ClickAider"><img src="http://hit.clickaider.com/i/button-36.gif" border="0"/></a></td></tr> <tr><td bgcolor="D4C9C5"><img src="http://www.nnseek.com/img/null.gif" height="2" width="100%"></td></tr> </table> <!-- End Footer --> <!-- mytrix f:0211 --> <script language="javascript"><!-- Mu="u8306.45.mytrix.com";Md=document;Mnv=navigator;Mp=0; Md.cookie="b=b";Mc=0;if(Md.cookie)Mc=1;Mrn=Math.random(); Mn=(Mnv.appName.substring(0,2)=="Mi")?0:1;Mt=(new Date()).getTimezoneOffset(); Mz="p="+Mp+"&rn="+Mrn+"&c="+Mc+"&t="+Mt; if(self!=top){Mfr=1;}else{Mfr=0;}Msl="1.0"; //--></script><script language="javascript1.1"><!-- Mpl="";Msl="1.1";Mj = (Mnv.javaEnabled()?"Y":"N");Mz+='&j='+Mj; //--></script><script language="javascript1.2"><!-- Msl="1.2";Ms=screen;Mpx=(Mn==0)?Ms.colorDepth:Ms.pixelDepth; Mz+="&wh="+Ms.width+'x'+Ms.height+"&px="+Mpx; //--></script><script language="javascript1.3"><!-- Msl="1.3";//--></script><script language="javascript"><!-- My="";My+="<a href='http://"+Mu+"/cnt?cid=830645&f=4&p="+Mp+"&rn="+Mrn+"' target='_blank'>"; My+="<img src='http://"+Mu+"/cnt?cid=830645&"+Mz+"&sl="+Msl+"&r="+escape(Md.referrer)+"&fr="+Mfr+"&pg="+escape(window.location.href); My+="' border=0 width=1 height=1 alt='mytrix'>"; My+="</a>";Md.write(My);//--></script><noscript> <a href="http://u8306.45.mytrix.com/cnt?cid=830645&f=4&p=0" target="_blank"> <img src="http://u8306.45.mytrix.com/cnt?cid=830645&p=0" alt='mytrix' border='0' width=1 height=1 > </a></noscript> <!-- mytrix --> <!-- BEGIN clickaider --> <script language="JavaScript"> <!-- clickaider_cid = "6a18d6b6-4"; clickaider_track_links = "ext"; // --> </script> <script id="clickaiderscript" language="JavaScript" src="http://hit.clickaider.com/clickaider.js"></script> <noscript> <img src="http://hit.clickaider.com/pv?c=6a18d6b6-4" alt="ClickAider" border="0" width="1" height="1" /> </noscript><!-- END clickaider --> </body> </html>