I tried using the "cookie jar" method also but to no avail. I create a file called cookies.txt in the same directory as the perl program with the example cookie i posted above in it but when i ran the script i got the following output
[nnp@main perl]$ perl connectCook.pl
cookies.txt does not...
Ok i decided to use LWP instead but i've ran into trouble with this aswell. Here is my code:
#!/usr/bin/env perl
use LWP 5.64;
$browser = LWP::UserAgent->new; #Create a UserAgent object
$url = "http://www.bright-shadows.net/challenges/programming/get_started/tryout.php";
$response =...
Damn, I forgot that the http header would be part of the response. It is a proper fully functional http server im connecting to so i assume it will use standard responses.
In that case its not the first line I want at all, its the first line of the data section.
Would the best way to read in...
In this part
while (<$sock>){
I will have to take the input and get the part of the text i need pretty quickly (1 second time limit).
When does that stop reading? (does it wait for a \n or how does the server signal its done sending?)
the reason I was using $buffer = <$sock>; is cause i...
Ok, this program im writing is part of a challenge on a site. Basically I have to connect to a page, take the output, parse out a string, append that string to a url and then connect to that url to get the solution. The following is my code
#!usr/bin/env perl -w
use IO::Socket;
$sock = new...
the input file is any text file, i.e a book
the output text file is one word per line as is the exclusion file.
Thanks for explaining that stuff man. If i have 20,000 words in the output file and im still taking in words would loading them into a hash not be a bit too much?
Btw, i still dont...
And two other things, if you feel like answering : )
Why did you use a hash for exclude instead of an array and why do you use next in those two statements instead of last? Dont you want to break if those are true? Is next the equivelant of a continue statement? So wouldnt it be last?
The reason I used the +>> instead of >> (it was that originally) was I wanted to open the output file for both reading and writing.
Once i've checked everything else I want to run through the output file to see if the word is already in it so i can avoid duplicates. Any ideas?
Thanks for the...
Hi, im writing a script to create lists of words from an input file. The script im writing is meant to take 3 arguments, an input file, a list of words not to be included in the dictionary and an output file. The problem is I want no repeated words in the dictionary. What im trying to do is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.