| Ripe_ | and the server returns some data :/ |
| gnari | Ripe_: like an error message ? |
| Ripe_ | yes |
| gnari | Ripe_: 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*. |
| gnari | Ripe_: have you tried simplifying your stuff? like taking out your proxy ? |
| Ripe_ | yes, gnari :/ |
| Traumprinz | hi |
| Ripe_ | i tried to do it directly |
| gnari | Ripe_: 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' |
| Traumprinz | ive 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 |
| gnari | Traumprinz: yes |
| SneakZa | whats 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 /%% |
| Traumprinz | gnari, any suggestions? |
| gnari | sneakza: what are you using now ? |
| SneakZa | havent tried anything yet was thinkhing about |
| gnari | Traumprinz: well, it looks silly to ues 2 invocations of perl |
| ktwilight | yo 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 |