#! perl -slw use vars qw[$required]; use strict; sub abstract (\$$) { my ($data, $req) = @_; my ($s, $p) = (0, 0); while ($p < $req) { $$data =~ /[^<]{1,${\($req - $p)}}/gc; last if ($p += pos($$data) - $s) >= $req; my ($q) = $$data =~ /\G[^"'>]+(.)/gc; #!" $$data =~ /\G[^$q]+/gc if $q =~ /["']/; #!" $$data =~ /\G[^>]+/gc; $s = ++pos($$data); } $$data =~ /\G[\w]+/gc; return substr( $$data, 0, pos($$data) ); } my $data = join '', ; $data =~ tr/\n/ /d; print abstract( $data, $required||40 ); __DATA__ A story on GettingIt about hacking polls. Contrary to what the article says, Time is not checking for multiple votes on their poll. And I'm happy to report that despite the fact that my cheater scripts aren't running, I'm still beating Bill Gates. Some more test data.
ThingsValues
A thingA value
#### c:\test>226146.pl -required=225 A story on GettingIt abouthacking polls.Contrary to what the article says, Time is not checking for multiple votes ontheirpoll. And I'm happy to report that despite the fact thatmy cheater scripts aren't running, I'm still beating c:\test>226146.pl -required=30 A story on GettingIt abouthacking c:\test>226146.pl -required=30 A story on GettingIt about hacking c:\test>226146.pl -required=225 A story on GettingIt about hacking polls. Contrary to what the article says, Time is not checking for multiple votes on their poll. And I'm happy to report that despite the fact that my cheater scripts aren't running, I'm still c:\test>226146.pl -required=300 A story on GettingIt about hacking polls. Contrary to what the article says, Time is not checking for multiple votes on their poll. And I'm happy to report that despite the fact that my cheater scripts aren't running, I'm still beating Bill Gates. Some more test data.
Things226146.pl -required=30 A story on GettingIt about hacking