Mathew Snyder wrote:
This is the meat of what I have. It looks like it should work exactly as you have only a bit more explicitly. All it does is return me to the prompt. I know there should be at least 100 emails in the text I'm parsing. In fact, I've figured out how to do this with HTML::TokeParser and am getting several hits. I just need to figure out how to eliminate things I don't want. my $agent = WWW::Mechanize->new(); $agent->get('https://rt.ops.servervault.com/'); $agent->submit_form( form_name => 'login', fields => { 'user' => $user, 'pass' => $pass, } ); $agent->follow_link(text => "Tickets"); $agent->submit_form( form_name => 'BuildQuery', fields => { 'ValueOfStatus' => $status, 'ValueOfActor' => $user, 'ValueOfQueue' => $queue, }, button => 'DoSearch' ); $agent =~ s/\s+/ /g; my @emails = Email::Address->parse($agent); foreach my $email (@emails){ print $email; };
OK, here's your problem. Sorry, I overlooked it before. You're trying to parse the WWW::Mechanize agent itself instead of the contents of the current page. You had it correct in your previous post! Try: my $data = $agent->content; my @emails = Email::Address->parse($data); print $_->address, "\n" foreach @emails; and if you're having trouble add in the $data =~ s/\s+/ /g line before parsing it. HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>