in reply to LWP posting a form

Well, the first thing I notice is that $contentpost doesn't have any whitespace. So I'm wondering about that s///. Did you want to put a '+' sign in-between the params? If so, it's not happening here. If that's what you want to do, it's probably better to just do it manually, rather than using a regex.

my $contentpost = "id=20010131".'+'. "&username=$username".'+'. "&password=$password".'+'. "&subject=$subject".'+'. "&comments=$post".'+'. "&submit=Submit";
I'm sure it can be prettier, but you get the idea.

Good luck,
db

Replies are listed 'Best First'.
Re: Re: LWP posting a form
by Kickstart (Pilgrim) on Feb 06, 2001 at 13:04 UTC
    Some of the variables (specifically $post and $subject) contain spaces, and that part seems to work fine. I'm thinking that the text in those might need to be url-encoded further (exclamation points prolly cause a problem). That part seems to be ok.

    Kickstart

      Oh, okay, that makes sense. That's what I get for offering advice before running the code. ;)