in reply to Nothing special. Isn't that what Perls all about?
Or, more succinctly:
#!/usr/bin/perl use LWP::Simple; use HTML::TableExtract; my $html = get "http://www.efd.lth.se/loginload.shtml" or die "Cannot get!\n"; my $te = HTML::TableExtract->new(headers => ['Name', 'Load average']); $te->parse($html)->eof; my @sorted = sort { $a->[1] <=> $b->[1] or $a->[0] cmp $b->[0] } $te-> +rows; for (@sorted) { print "$_->[0] has load of $_->[1]\n"; } print "exec ssh $sorted[0][0]\n";
-- Randal L. Schwartz, Perl hacker
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Nothing special. Isn't that what Perls all about?
by Beatnik (Parson) on May 24, 2001 at 01:27 UTC |
In Section
Cool Uses for Perl