1) Message boards : Number crunching : Is there?....or...I want....! (Message 18694)
Posted 13 Dec 2007 by lidden
Post:
If you have Perl installed this should work:

<code>
use warnings;
use strict;
use LWP::Simple;

my $url = 'http://lhcathome.cern.ch/lhcathome/';
my $content = get $url or die 'Could not fetch page';
my $re = qr/([^<]+)/;

for ( $content =~ m!<h2>Server Status</h2>\\n$re<br />$re<br />!){
print "$_\\n";
}
</code>

Perl for windows can be downloaded from activestate.com



©2024 CERN