#!/usr/bin/perl -w use strict; # sobad my $content = `curl -s http://www.failheap-challenge.com/forum.php`; my $wanted = lc($ARGV[0]) || 'members'; my %values = (); if($content =~ /]+id="wgo_stats".*?>(.*?)<\/div>/msi) { my $statblock = $1; while($statblock =~ s/
(.*?)<\/dt>\s*
(.*?)<\/dd>//msi) { my $name = $1; my $val = $2; $val =~ s/\D//g; $values{lc($name)} = $val; } print "Members: " . $values{$wanted} . " | members=" . $values{$wanted}; return; } print 0; return;