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

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.

Replies are listed 'Best First'.
Re^5: WWW::Mechanize help
by moritz (Cardinal) on Aug 20, 2008 at 15:47 UTC
    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.