Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

George_Sherston's scratchpad

by George_Sherston (Vicar)
on Jun 02, 2004 at 01:58 UTC ( [id://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
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-10-07 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (44 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.