I was way over thinking this. A simply split command to break the scalar content up by \n solved my problems.
Paul -----Original Message----- From: Kevin Old [mailto:[EMAIL PROTECTED] Sent: Friday, November 14, 2003 9:47 AM To: [EMAIL PROTECTED] Cc: 'Beginners Perl' Subject: RE: Mechanize On Fri, 2003-11-14 at 09:36, Paul Kraus wrote: > Yes I have read the POD in fact I have them printed out in front of > me. Unless I am missing something and I doubt I am since I have read > it like 4 times. All you can really do using mechanize is parse the > content for links and forms. > > I need to parse out data from the page that is neither a link or form. > > I need to read the content a line at a time and using a regex find the > content I want to isolate. > > Your second link all though helpful also seems to be only dealing with > the above mentioned conditions. > > Sorry if this seems trivial. I am not new to perl but $a-content() is > not working the way I would expect it to behave. > > The regex I would use is /class="statement" align="center"/ Paul, I'd love to help, but don't have anything to test against. Can you send me the results from $a->content so that I can see what you're getting? Couldn't you just save the results from $a->content to a scalar, then use a regex on it? my $results = $a->content(); $results =~ m/what I'm looking for/; Also, from the POD for WWW::Mechanize: Mech is well suited for use in testing web applications. If you use one of the Test::*, like Test::HTML::Lint modules, you can check the fetched content and use that as input to a test call. use Test::More; like( $a->content(), qr/$expected/, "Got expected content" ); Hope this helps, Kevin -- Kevin Old <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]