Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

George_Sherston's scratchpad

by George_Sherston (Vicar)
on Jun 02, 2004 at 01:58 UTC ( #358996=scratchpad: print w/replies, xml ) Need Help??

#!/usr/bin/perl -w use strict; use lib '/home/httpd/lib'; use CGI qw/:standard :cgi-lib/; use LWP::Simple; my $text = get 'http://www.perlmonks.net/index.pl?node_id=110166'; my %names = (George_Sherston => 110166); while ($text =~ s#.+?
by (.+?) on \w{3} \d{1,2}, \d{4} at# #) { unless (defined $names{$3}) { $names{$3} = $1; } } my @names = sort {lc $a cmp lc $b} keys %names; my $nr = scalar @names; my $col = int($nr/3); open FH, ">index.html"; print FH start_html('Perlmonks Name Space Index'), h2('Name Space Index'), p('This page is an index for the Name Space node on Perlmonks. It updates daily. The link opens in a new window.'), p("This page has no rocket science - it just indexes the first node added to the thread by a given monk. If you didn\'t put your etymology on your first sub node then may I encourage you to edit the sub node? So far $nr nodes are indexed."), p('Blessings on your houses,

George'), '
', "\n", h2('Index:'); for (0..$col) { print FH "<A HREF=\"http://www.perlmonks.net?node_id=$names{$names$_}\" TARGET=\"NameSpace\">$names$_
\n"; if (lc(substr($names$_,0,1)) ne lc(substr($names$_+1,0,1))) { print FH "
\n"; } } print FH '
'; for ($col..(2*$col)) { print FH "<A HREF=\"http://www.perlmonks.net?node_id=$names{$names$_}\" TARGET=\"NameSpace\">$names$_
\n"; if (lc(substr($names$_,0,1)) ne lc(substr($names$_+1,0,1))) { print FH "
\n"; } } print FH '
'; for ((2*$col)..$#names) { print FH "<A HREF=\"http://www.perlmonks.net?node_id=$names{$names$_}\" TARGET=\"NameSpace\">$names$_
\n"; if (defined $names$_+1 and lc(substr($names$_,0,1)) ne lc(substr($names$_+1,0,1))) { print FH "
\n"; } } print FH '
', "\n", end_html;
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[Lady_Aleena]: Module is currently 104 lines but will shirnk to 63. The script using the module is currently 40 lines but will grow to 82, 180 to 146 lines total. (This is after rewrting the data files.)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2017-05-29 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?