in reply to Re: Where did I go wrong?
in thread Where did I go wrong?

ok..here are the errors... unmatched right curly bracket at c:\users\xxx\perl\script.pl line 17, at end of line syntax error at line 17, near "}" execution aborted due to compilation errors

Replies are listed 'Best First'.
Re^3: Where did I go wrong?
by ikegami (Patriarch) on Nov 13, 2007 at 22:32 UTC
    That error does not exist in the code you gave us.
      it's the error I received when I tried to run it :/ here is exactly what i have now..
      #!/usr/bin/perl -w use LWP::UserAgent; my $digits; my $filename = '/tmp/blah.txt'; open( FILE, '<', $filename ) or die "Can't open $filename: $!\n"; $digits = $_; print "Attempting line: " . $digits; k_go_now($digits); # Sleep to keep us slightly more hidden and load off their servers sleep(1); } # k go now sub; grabs input from file ($username, $password) tries to +login sub k_go_now { my ($digits) = @_; $ua = LWP::UserAgent->new; $ua->agent("MyApp/0.1 "); # Create a request my $req = HTTP::Request->new(POST => 'https://xxx.com'); $req->content_type('application/x-www-form-urlencoded'); $req->content('query=libwww-perl&mode=dist'); # Pass request to the user agent and get a response back my $res = $ua->request($req); # Check the outcome of the response if ($res->is_success) { check_output ($res->content); } else { print $res->status_line, "\n"; } } # suib check_output checks the response from the website and if it's a +ny good sub check_output { my ($output) = @_; if ($output =~ /Login Failed/) { print "Nope, failed login\n"; } elsif ($output =~ /Login Successful/) { print "got'em with login details\n"; } else { print "unknown response !!!\n$output\n\n"; } }
        You accidentally deleted the while line.