Please forgive the off topic post but I don't subscribe to a
perl list, and hate to for the occasional question.

OK, I give up.  I know this should be a simple task but I
cannot get it to work.  I am using the perl libwww request
object to retrieve the results of a POST. I get the result
back (html page source) in one big string.  How do I parse
the string variable into an array with each element
containing one line of the result.

I figured I sould do something like :
$resstring = $ua->request($req)->as_string;

@resarray= split /\n/, $resstring;
for (@resarray) {
    if (/string/) {
        further processing
    }
}
I have tried all sorts of variants but seem to always end up
with the value 1, or the whole string (html page that I
started with) in @resarrary.

This is kicking my butt.

Any help appreciated.

Bret



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to