in reply to Re: Which loop should I use?
in thread Which loop should I use?
? I'm doing what you showed as an example and I get:my $start = 1; my $end = 10; my $cnt = 0; for ($start..$end) { $cnt++; print "<b>Current page count: $cnt</b><p><p>"; my $funky = "http://www.allpoetry.com/chat/page=$cnt;"; my $content = get($funky); my $tree = HTML::Tree->new(); $tree->parse($content); # retrieve the text and split into lines my @lines = split "<br>", $tree->as_text; local $/; my @good_lines; my $good_lines; for my $lines (@lines) { $lines =~ s/\)/\)<br>/g; while($lines =~ m/Next Chatter \>(.*?)\< Previous Chatter/gs){ $good_lines = $1; push @good_lines,$good_lines; } foreach (@good_lines){ my @lines = split /<br>/; foreach (@lines){ next unless $_; #m/^(.*?):(.*?) \((.*) (?:seconds|minute|minutes|hour|hours|day +|days) ago\)$/; #m/([^:]+): (.+)\((.*)\)/; m/([^:]+): (.+)(\((.*)\))/; my( $name, $text, $delay ) = ( $1, $2, $3 ); #print "NAME:$name\nText:$text\nDelay:$delay\n\n"; #if ($name =~ m/Elisabeth/) { print "$name $text $delay<br>"; # $text $delay<br>" #} } } } }
sprkls926 hello (17 minutes ago) sprkls926 i don't feel good (17 minutes ago) kinkygoddess hiya ppls (17 minutes ago) sprkls926 *faints and slids off the roof* (17 minutes ago) sprkls926 *watches the blood follow outta her* (18 minutes ago) Shinigami why sad ? (18 minutes ago) Shinigami why sad ? (18 minutes ago) sprkls926 sad (19 minutes ago) sprkls926 *crys and cuts her neck* (19 minutes ago) Shinigami so howz everyone ? (19 minutes ago) FiXato sure sw...just comment on mine and I will get back to one of yo +urs right away (20 minutes ago) sidewinder hmmm.....not that I know of... (20 minutes ago) sprkls926 sidewinder is there anyway to revires this vampire thing* + (21 minutes ago) Shinigami hello everyone (22 minutes ago) sidewinder No one wants to trade? (22 minutes ago) vampira1665 morning sidewinder, I will read some of ur stuff if there +is any I haven't read (22 minutes ago) sidewinder no wants to trade??? (22 minutes ago) sprkls926 *starts to claw at her neck* (24 minutes ago) sprkls926 *backs away from everyone* (25 minutes ago) sidewinder anyone (25 minutes ago) ForgottenAngel666 ::stays in my corner alone:: (25 minutes ago) sidewinder anywanna trade comments? (26 minutes ago) sidewinder anywanna trade comments? (26 minutes ago) Yume *sighs* I must leave but I will return! (26 minutes ago) Yume *sighs* I must leave but I will return! (26 minutes ago) Yume *sighs* I must leave but I will return! (27 minutes ago) sidewinder joins sprkls (29 minutes ago) sprkls926 *sits on the roof with her head cast downward* (30 minut +es ago) sprkls926 *bites sidewinder then leaves the room* (30 minutes ago) sidewinder *smiles* (31 minutes ago) Yume noooooooooo! not monkey!! (32 minutes ago) sprkls926 munkey come back i am going outside u r safe no one will hur +t u (32 minutes ago) sprkls926 i will be back soon (32 minutes ago) sathethert with that, i have to go to trauma. see yaaaaaaaaaaaaaa +(32 minutes ago) ForgottenAngel666 ..munkey come back.! (not that u even like me no mor +e ) ForgottenAngel666 ..munkey come back.! (not that u even like me no mor +e ) ForgottenAngel666 ..munkey come back.! (not that u even like me no mor +e ) Current page count: 2 Current page count: 3 Current page count: 4 Current page count: 5 Current page count: 6 Current page count: 7 Current page count: 8 Current page count: 9 Current page count: 10
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Which loop should I use?
by tedrek (Pilgrim) on Jul 31, 2003 at 19:16 UTC | |
by coldfingertips (Pilgrim) on Aug 01, 2003 at 06:44 UTC | |
by tedrek (Pilgrim) on Aug 01, 2003 at 16:46 UTC | |
Re: Which loop should I use?
by tadman (Prior) on Jul 31, 2003 at 19:13 UTC |