Re: Re: Untitled

By Lousy Bongo, 11 Years ago, written in Perl, viewed 689 times. This paste is a reply to Re: Untitled by Tinct Moth
URL http://pb.stoleyour.com/view/6be73941 Embed
Download Paste or View RawExpand paste to full width of browser
  1. #!/usr/bin/perl -w
  2.  
  3. use strict;
  4.  
  5. # sobad
  6. my $content = `curl -s http://www.failheap-challenge.com/forum.php`;
  7. my $wanted = lc($ARGV[0]) || 'members';
  8.  
  9. my %values = ();
  10. if($content =~ /<div[^>]+id="wgo_stats".*?>(.*?)<\/div>/msi) {
  11.   my $statblock = $1;
  12.  
  13.   while($statblock =~ s/<dt>(.*?)<\/dt>\s*<dd>(.*?)<\/dd>//msi) {
  14.      my $name = $1;
  15.      my $val = $2;
  16.      $val =~ s/\D//g;
  17.      $values{lc($name)} = $val;
  18.   }
  19.  
  20.   print "Members: " . $values{$wanted} . " | members=" . $values{$wanted};
  21.   return;
  22. }
  23.  

Replies to Re: Re: Untitled rss

Title Name When
Re: Re: Re: Untitled Ample Water Vole 11 Years ago.

Reply to "Re: Re: Untitled"

Here you can reply to the paste above