multithreading in perl

2001-09-29 Thread ben goswami
I've to deal with threading in perl to handle the following situation: 1. a cgi script excutes a job which will take a long time to finish. Instead of setting a high timeout, I'm planning to implement threading feature in perl. So when the CGI fires up the script, I would like to create a thread

Http post problem

2001-08-01 Thread Ben Goswami
Hi, I'm having problem submitting a form post. Here is the code. I'm getting an error *** Can't locate object method "method" via package "POST" at C:/perl/site/lib/LWP/UserAgent.pm line 163. ** Code: my $ua = new LWP::UserAgent; $ua->timeout(300); my $res = $ua->request(POST => 'www.ab

How do I filter out of 'control characters' from the submitted values

2001-05-19 Thread ben goswami
Hi, I'm having problem with control characters submitted thru a 'text are element'. here is the situation: 1. I've a form which has a text are element: 2. user puts a text there by doing a cut/paste from somewhere. Some cotrol characters are put because of doing cut and paste. 3. When I get the

problem getting text from text area

2001-05-16 Thread ben goswami
whats the best way to get text from textarea field type. I've a file like : aa:bb cc:dd ee:ff when I display this inside textarea field and try to extract the modified value from the form after submit thru normal method , it introduce an additional space/junk character. any idea. here is the co

masking IP on a request

2001-05-08 Thread ben goswami
Hi, Is it possible to mask the IP in the request to the webserver. I'm using a free service on a website thru an 'perl agent'. But when i go beyond a certain number of trials it says 'I cannot use it any more'. I guess they have some setting in the webserver config which tracks this. any idea

where is hte lates lwp module

2001-05-03 Thread Ben Goswami
OurNet-1.4-alpha4 ParallelUserAgent-2.50 perl-ldap-0.15 perl-ldap-0.23 -Original Message- From: Ben Goswami [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 10:25 AM To: 'Tim Allwine'; 'Nick Chirca' Cc: '[EMAIL PROTECTED]' Subject: RE: how to access we

RE: how to access web sites

2001-05-03 Thread Ben Goswami
Tim, Thanks for your help. I ran it and got the following error after page step 9 the error is: *** Can't locate object method "epath" via package "URI::http" at C:/Perl/site/lib/H TTP/Cookies.pm line 256. * extract from my my cookie.pm file * my $url = $response->request->url

RE: how to access this page?

2001-05-02 Thread Ben Goswami
did you take a look at webchatpp(in cpan) or wget(search in google) -Original Message- From: Nick Chirca [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 3:30 AM To: arturo didonna Cc: [EMAIL PROTECTED] Subject: Re: how to access this page? Has anybody succeeded in finding a wa

How to get rid of all tags from html

2001-04-29 Thread ben goswami
hi, I'm could not find any method in html::perser, or html::tokeperser which will allow me to get rid of all the tags and return the 'text' part of the html. Most of the methods deal with how to handle individual tag. writing a callback for every tag will be a lengthy method. I tried html::forma

Re: how to get the text between two patterns

2001-04-27 Thread ben goswami
--- Original Message - From: <[EMAIL PROTECTED]> To: "ben goswami" <[EMAIL PROTECTED]> Cc: "Kai Krebber" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, April 27, 2001 9:34 AM Subject: Re: how to get the text between two patterns > you nee

Re: how to get the text between two patterns

2001-04-27 Thread ben goswami
Kai, that works for one line content but for multiple lines it returns blank. here is the code, it has in the content. remove "\n" it will work. *** my $start = "May Even Merge With"; my $end = "Related Links"; my $Content = "WWW RRR Carriers May Even Merge

is there any escape_URL dunction

2001-04-27 Thread ben goswami
Hi, is there any escape_URL function which will allow me to escape any URL instead of handling urls everytime seperately. my $Url = "http://www.epaynews.com/index.cgi?survey=&ref=browse&f=view&id=98837486321212015050&block=; my $ua = LWP::UserAgent->new; ## next line causes problems as url is

how to get the text between two patterns

2001-04-27 Thread ben goswami
Hi, What's the easiet way to get text between two patterns from an input file. I'm doing it thru getting position etc. which is rather lengthy. what about map function? $start_pattern="aa"; $end_pattern="bb"; $file = $_; $content = _xyz($file,$start_pattern,$end_pattern)

Does anyone know

2001-04-24 Thread ben goswami
Hi, Does anyone have any script to go to a url identify all the links for the headlines (by a paatern matching), go and download content from each of those links and write to a single file here is the scenario: 1. go to a urL:(ex: www.epaynews.com) 2. get the links for head lines (they start wi

How do I use webchat to do webscrapping

2001-04-24 Thread ben goswami
Hi, I'm trying to use webchat to download content from web and write them to file. I could not make much progress. my questions are : 1. how do I print the $res (the content) from the site to std out or to a file 2. do you have more docs on how to write the 'chat scripts' for advance usage 3.

using webchat to do sitescrapping

2001-04-23 Thread Ben Goswami
Has anyone used webchat to do site scrapping?

Problem in retrieving the cookie

2001-04-23 Thread Ben Goswami
Hi, I'm having problem to make the cookie work. I'm not getting anything when I call getCookie method any help is appreciated here is the code: * ##to send the cookie my $cartId=$Response[0]->{id}; my $cookie1 = new CGI::Cookie(-name=>'ID',-value=>$cartId); print $q->header(); print

what is a good perl xml mailing list

2001-04-23 Thread ben goswami
Does any one know a good perl xml mailing list?

webchat

2001-04-23 Thread ben goswami
nes (they start with pattern " to and write to a file. 4. do it for all the headline links and write the contents to a single file. thx ben >>"Ben Goswami" <[EMAIL PROTECTED]> writes: >> Is there any good free web site scrapping script available which can extract

How to check if a node is null in XML parser

2001-04-20 Thread Ben Goswami
Sorry!! there was a typo ... in the last mail: Hi how do I check if a node is null. here is the piece of code ** my $itemNodes = $cartNode->getElementsByTagName (ITEM_NODE_NAME); for ..() { $itemnode = $itemNodes->item ($i); if (!$itemNode) {

How to check if a node is null in XML parser

2001-04-20 Thread Ben Goswami
Hi how do I check if a node is null. here is the piece of code ** my $itemNodes = $cartNode->getElementsByTagName (ITEM_NODE_NAME); for ..() { $itemnode = $itemNodes->item ($i); if (!$itemNode) { croak "ERROR:getItemVariation : itemnode no

web site scrapping

2001-04-18 Thread Ben Goswami
Hi, Is there any good free web site scrapping script available which can extract contents from web sites based on url, patterns(to extract the part of the content after doing a http get) post data etc. as an input parameters thx ben

RE: How do I build a associative array from a dyanamic list

2001-04-11 Thread Ben Goswami
Thanks, but I still have not the answer. my question is : here is the data source which is an xml: = 11 id = 12 id = 13 I've to build an nested assoicative array (like: %response = ( cart-> { item1 => 11, item2 = 12,

FW: How do I build a associative array from a dyanamic list

2001-04-11 Thread Ben Goswami
hi, How can I create a associative array from an unknown list of entities. As we don't have an equivalent of 'add' or 'push' function for the associative array. for example: I'm trying to parse an xml file and create an nested associative array. The number of 'items' element in the source data m

How to use xml Dom perser

2001-04-05 Thread Ben goswami
Hi, I'm trying to build an associative array out of an xml document. I'm using DOM but having some problems using the the DOM methods(like getChildNodes etc.) to extract elements/values from the xml doc. Can anyone point to me some sample code thx ben __

RE: [patch] Authenticating proxies & LWP

2001-04-05 Thread Ben Goswami
Hi, anybody knows where can I find Dom.pm for XML::Dom, it is not in activestate or CPAN site thx ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of John Klar Sent: Wednesday, April 04, 2001 1:01 PM To: [EMAIL PROTECTED] Subject: [patch] Authenticating

looking for a out of print perl book

2000-05-15 Thread Ben Goswami
Hi, I'm lloking for this out of print book. publisher: O'Rielly's title: Web Client Programmin with Perl, Author: Clinton Wong.   any help is appreciated   ==  

Cookie problem

2000-05-11 Thread Ben Goswami
7;lg' => 'US',  '.chkP' => 'Y'];   $request = POST $urlone, $formvaluesone;$ua->cookie_jar($cookie_jar);$cookie_jar->add_cookie_header($request);   $response = $ua->request($request);$cookie_jar->extract_cookies($response);print $response->conte

problem doing a POST with cookie enable mode

2000-05-11 Thread Ben Goswami
   AutoSave => 1,); $njar->add_cookie_header($req);   thx ben ========== Ben Goswami Infospace Inc. (650) 567-1281 http://www.prio.net Get cash back when you shop and dine, online and offline!  Learn more at http://www.prio.net/join/now.html  

problem with netscape cookie

2000-05-10 Thread Ben Goswami
Hi,   I'm trying to develop an agent which will do a POST to a personalized website (like my.yahoo.com) with username and password and grab the content.  I tested it agianst my.yahoo web site. it does not work and compalins about a cookie.   If you have any code which works please let me