in reply to Re^2: WWW::Mechanize help
in thread WWW::Mechanize help

Again if you do it properly, it should work. Which means that you are not doing it properly. Which in turn means that your error is somewhere around line 42.

Or in other words: If you don't show us the code, we can't tell.

Show us a very simple, reduce example that demonstrates your problem. It doesn't have to use WWW::Mechanize at it, it can just pass around constant string.

Replies are listed 'Best First'.
Re^4: WWW::Mechanize help
by ZimCS (Novice) on Aug 20, 2008 at 15:40 UTC
    I will try and filter out the relative information so it isn't so long.
    #---------------------------------------------------- # use STATEMENTS #---------------------------------------------------- use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); #---------------------------------------------------- # Get input from website #---------------------------------------------------- my $query = new CGI; my $form_product = $query->param('product'); my $form_tested_on_build = $query->param('tested_on'); my $form_feature = $query->param('feature'); my $form_crs_resolved = $query->param('crs_resolved'); my $form_comments = $query->param('comments'); my $form_paths = $query->param('paths'); . . . system ("submit.pl", $id_line, $form_tested_on_build, $form_feature, $ +form_crs_resolved, $form_comments, $temp_paths);
    And then submit.pl contains:
    #------------------------------------------- # use STATEMENTS #------------------------------------------- use CGI::Carp qw(fatalsToBrowser); use CGI; use strict; use WWW::Mechanize; use Time::HiRes; . . . # Second page of WSDBuild $agent->field("ID_BUILD_TESTED", "$ARGV[1]"); $agent->select("ID_TEAM", "3456"); # Defaulted to CDMA Common Compone +nt $agent->field("HEADLINE", "$ARGV[2]"); $agent->field("CR_LIST", join("\n", "$ARGV[3]")); #$agent->field("COMMENT", join("\n", "$ARGV[4]")); $agent->field("COMMENT", $ARGV[4]); #$agent->field("PATHS", join("\n", $ARGV[5])); $agent->click(); # Saves submitted page whether successful or not $agent->save_content("$log_file");
    I am just concerned with the comments field for now, because the others are only 1 line. Let me know if there is anything else that will help. Thanks.
      There's nothing obvious wrong with your piece of code, but it's nothing that I can actually run easily. Did you print out the contents of $form_comments to check that it actually contains what your think it does?

      And as mentioned before, all those calls to join are superfluous.