#perl - Mon 19 Feb 2007 between 07:38 and 07:47



Ripe_and the server returns some data :/
gnariRipe_: like an error message ?
Ripe_yes
gnariRipe_: that's because the url is not valid
Ripe_yes, I know
somian^{}But Ripe_ is expecting the code to keep running, even though there's an HTTP error
Ripe_exactly :)
I posible to put a timeout? :/
somian^{}He's baffled by the code never reaching the place where it prints AFTER (line 78)
Yes, you can specify a timeout for LWP, but I ...
Ripe_but you...
gg_hi
somian^{}... do not think it ought to make any diff; once the error has been returned by the server, that's it
So, I am not coming up, personally, with any ideas as to how to explain that behavior to you, Ripe_; but that's just *me*.
gnariRipe_: have you tried simplifying your stuff? like taking out your proxy ?
Ripe_yes, gnari
:/
Traumprinzhi
Ripe_i tried to do it directly
gnariRipe_: what does this do (after substituting the correct url): perl -le'use LWP::UserAgent;my $ua=LWP::UserAgent->new;$res=$ua->get("http://localhost/%%");print $res->code'
Traumprinzive got this "one liner" that looks very complicated to me, it extracts days/hours/minutes from uptime...can i make this "shorter"?
uptime | perl -ne 'if ($_ =~ /up\s{1,}(\d{1,2}:\d{2}|\d{1,2}\s{1,}days,\s{1,}\d{1,2}:\d{2})/){print "$1\n"}' | perl -nle 'if($_ =~ /((\d{1,2})\sdays,\s{1,}(\d{1,2}):(\d{2})|(\d{1,2}):(\d{2}))/) {print "$2$3$4$5$6"}'
Ripe_okay :D
gnariTraumprinz: yes
SneakZawhats the quickest way to read just the first line from a file?
in perl
Ripe_w0 guys... seems to be a server problem now...
Its load balanced
and one of the servers d not return anything wen I get /%%
Traumprinzgnari, any suggestions?
gnarisneakza: what are you using now ?
SneakZahavent tried anything yet
was thinkhing about
gnariTraumprinz: well, it looks silly to ues 2 invocations of perl
ktwilightyo
k, i'm really dumb on this. am using debian etch and perl's CPAN is asking me where apache's directory is, but what does that mean? /etc/apache2?
or is it like /usr/sbin/apache2ctl?
or some /usr/lib/path/to/dunno/where
it's too vague for my liking
Ripe_thanks you all :D

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 

IrcArchive