Re: MAIL::POP3CLIENT QUESTION-HELP!
sorry! there was a typo err in host field nevertheless thanks to all - Original Message - From: "Trevor Joerges" <[EMAIL PROTECTED]> To: "mail admin" <[EMAIL PROTECTED]>; "WIN32-PERL" <[EMAIL PROTECTED]> Sent: Friday, November 28, 2003 1:00 AM Subject: Re: MAIL::POP3CLIENT QUESTION-HELP! > Sounds like your POP connection has entered a DEAD state. Try checking the > status of the connection using the 'State' method like so after you print > the message count: > > print $pop->State(), "\n"; > > HTH, > Trevor Joerges > > - Original Message - > From: mail admin > To: WIN32-PERL > Sent: Wednesday, November 05, 2003 5:44 AM > Subject: MAIL::POP3CLIENT QUESTION-HELP! > > > GIVEN NEXT SNIPPET > ++ > use Mail::POP3Client; > $pop = new Mail::POP3Client( USER => "...", > PASSWORD => "", > HOST => "" ); > my $nn=$pop->Count(); > print "n=$nn\n"; > for ($i = 1; $i <= $pop->Count(); $i++) { > foreach ( $pop->Head( $i ) ) { > /^(From|Subject):\s+/i and print $_, "\n"; > } > print "\n"; > } > ++ > I get n=-1 after some time even if there is > messages in my mailbox !/i have analogous prog in VB/ > And what I'm supposed to do ? > i run ActiveState Perl 5.8 on XP-box > > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
MAIL::POP3CLIENT QUESTION-HELP!
GIVEN NEXT SNIPPET ++ use Mail::POP3Client; $pop = new Mail::POP3Client( USER => "...", PASSWORD => "", HOST => "" ); my $nn=$pop->Count(); print "n=$nn\n"; for ($i = 1; $i <= $pop->Count(); $i++) { foreach ( $pop->Head( $i ) ) { /^(From|Subject):\s+/i and print $_, "\n"; } print "\n"; } ++ I get n=-1 after some time even if there is messages in my mailbox !/i have analogous prog in VB/ And what I'm supposed to do ? i run ActiveState Perl 5.8 on XP-box
automate of source install of perl packages
Hi All! this is Win32 list but ... there is a couple of related questions: 1) I have a perl-tk prog that after choosing tar.gz file unpacks it ,displays readme file and starts makefile.pl in console(cmd) window -like that: + SetForegroundWindow ($win_handl); SendKeys("cd \\ {enter}"); SendKeys("cd $_ {enter}"); SendKeys("perl makefile.pl{enter}");++ after that I type nmake ... etc my question is -- Win32::GuiTest is win32 specific Any suggestion on how to get this functionality on my linux redhad box ?? 2)Automating loading of .tar.gz files from CPAN i use Win32::RASE module to dialup connect to internet How to connect to internet from Perl in linux ??
Re: WWW::Mechanize question
- Original Message - From: "$Bill Luebkert" <[EMAIL PROTECTED]> To: "mail admin" <[EMAIL PROTECTED]> Cc: "WIN32-PERL" <[EMAIL PROTECTED]> Sent: Wednesday, October 08, 2003 9:03 AM Subject: Re: WWW::Mechanize question + {$res = $ua->click(); # retrieve the content) I found funny looking URL {$ur1) and repeated get; this URL probably holds packed responses from 1-st form params = my $rr=$res->{_headers}; my %ha=%$rr; $_=$ha{refresh}; my $ur1; if (/(.)URL\=/){$ur1=$';}; $res = $ua->get($ur1); ==== after this $res contains needed page ! > mail admin wrote: > > > In browser I see login form ; > > after filling login & passwd and clicking submit button I see html page. > > here is the code snippet: > > > > use WWW::Mechanize; > > my $agen=WWW::Mechanize->new(); > > my $url=... > > $agen->get($url); > > die "can't get start page: ",$agen->response->status_line unless > > $agen->success; > > my $uri=$agen->uri; > > print "uri=$uri\n"; > > my $fm1=$agen->current_form(); > > my $logi=... > > my $pwd=...; > > #$agen->set_fields('login'=>$logi 'passwd'=>$pwd); > > $agen->set_fields('login'=>$logi); > > $agen->set_fields('passwd'=>$pwd); > > $agen->click(); > > $uri=$agen->uri; > > print "uri=$uri\n"; > > + > > What is next step ? > > how I am to access html form (which I see in browser after clicking > > SUBMIT ?) > > # get first page (I'm using a cookie jar to handle any cookies) > > my $cookie_jar = HTTP::Cookies->new(File => $cookiefile, autosave => 1); > $ua = new WWW::Mechanize; > $ua->cookie_jar($cookie_jar); > $ua->agent('Mozilla/4.0'); > $res = $ua->get($url); > if (not $res->is_success) { > die "Error retrieving first page: $!"; > } > > # now fill in the third form on the page (change the 3 to the correct form > # on your page > > $ua->form(3); > $ua->field('login', $login); > $ua->field('password', $password); > $res = $ua->click(); # retrieve the content > if ($res->is_success) { > my $content = $res->content(); # do something with content (parse it) > } else { > die "Error retrieving form page: $!"; > } > > > -- > ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] > (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] > / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ > -/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
perl Tk question
+++ if the Up or Down key is pressed, the location cursor (active element) moves up or down one element. If the selection mode is browse or extended then the new active element is also selected and all other elements are deselected. In extended mode the new active element becomes the selection anchor.+++ however given snippet code: use Tk;my @arr=qw(1 2 3);my $mw = MainWindow->new;$mw->title('listbox exampl');my $list=$mw->Scrolled(qw/Listbox -setgrid 1 -height 12 -scrollbars e/);$list->pack(qw/-side left -expand yes -fill both/);$list->insert(0,@arr); MainLoop;exit; = it is not so! Does anybody knows how to made Up or Down keys work in this example ? from perl docs on listbox widget: