Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
    0: #!/usr/bin/perl -w
    1: 
    2: #I didn't intend for something so long to end up on the
    3: # frontpage.  I'd keep it in Craft if I could.  Sorry.
    4: 
    5: #PipsPerlMonksThemer - PPMT
    6: # You can play with this craft at http://BinQ.org/ppmt/
    7: #  Please do... and tell me what you thinq. =)
    8: 
    9: use CGI ":standard";
    10: use LWP::UserAgent;
    11: 
    12: my $this = "http://BinQ.org/ppmt/index.cgi";
    13: my $filp = "/home/httpd/html/ppmt/filters/";
    14: my $favs = "/home/httpd/html/ppmt/favoritz.txt";
    15: my $meth = $ENV{'REQUEST_METHOD'};
    16: my $quer = $ENV{'QUERY_STRING'};
    17: my $what = param("whattodo");
    18: my $monk = param("wichmonk");
    19: my $site = "http://PerlMonks.org";
    20: my $srch = "PerlMonks";
    21: 
    22: my $wich = param("wichfilt");
    23: my $nick = param("wichnick");
    24: my $uage = new LWP::UserAgent;
    25: my @flis = glob("$filp*");
    26:    $uage->agent("AgentName/0.1 " . $uage->agent);
    27: my $requ = "";
    28: my $resp = "";
    29: 
    30: 
    31: print "Content-type: text/html\n\n";
    32: 
    33: if ($quer ne "") {
    34:     if ($quer =~ /^filt=([^&]*)&/) { $filt = $1; $quer =~ s/^filt=[^&]*&//; }
    35:     if ($quer !~ /^http\:\/\//) { $quer = "http://" . $quer; }
    36:     $requ = new HTTP::Request GET => "$quer";
    37:     $resp = $uage->request($requ);
    38:     if ($resp->is_success) {
    39:         $cont = $resp->content;
    40:         $foun = 0;
    41:         open FILE, "<$filp$filt";
    42:         while (<FILE>) {
    43:             chomp ($parm = $_);
    44:             chomp ($sour = <FILE>);
    45:             chomp ($dest = <FILE>);
    46:             $quer =~ s/(.*\/).*/$1/;
    47:             $dest =~ s/\{\$quer\}/$quer/;
    48:             if ($filt eq "randomal") {
    49:                 $whol = $sour;
    50:                 if ($whol =~ /((color="?\#?|\w+="?\#|\w+=")([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})"?)/i) {
    51:                     $redv = $3; $grnv = $4; $bluv = $5;
    52:                     $nred = sprintf "%lx", (rand(255));
    53:                     $ngrn = sprintf "%lx", (rand(255));
    54:                     $nblu = sprintf "%lx", (rand(255));
    55:                     if (length($nred) == 1) { $nred = "0" . $nred; }
    56:                     if (length($ngrn) == 1) { $ngrn = "0" . $ngrn; }
    57:                     if (length($nblu) == 1) { $nblu = "0" . $nblu; }
    58:                     $whol =~ s/(color="?\#?|\w+="?\#)$redv$grnv$bluv"?/$1/i;
    59:                     $whol =~ s/="?\#?/="\#/i;
    60:                     #$whol =~ tr/A-Z/a-z/;
    61:                     $nred =~ tr/a-z/A-Z/;
    62:                     $ngrn =~ tr/a-z/A-Z/;
    63:                     $nblu =~ tr/a-z/A-Z/;
    64:                     $whol .= "$nred$ngrn$nblu\"";
    65:                     $dest = $whol;
    66:                 }
    67:             }
    68:             $dlis[$foun] = $dest;
    69:             if ($foun < 1024) {
    70:                 if ($parm =~ /g/i) {
    71:                     if ($parm =~ /i/i) {
    72:                         $cont =~ s/$sour/SoUr${foun}dEsT/gi;
    73:                     } else {
    74:                         $cont =~ s/$sour/SoUr${foun}dEsT/g;
    75:                     }
    76:                 } else {
    77:                     if ($parm =~ /i/i) {
    78:                         $cont =~ s/$sour/SoUr${foun}dEsT/i;
    79:                     } else {
    80:                         $cont =~ s/$sour/SoUr${foun}dEsT/;
    81:                     }
    82:                 }
    83:                 $foun++;
    84:             }
    85:         }
    86:         while ($foun) {
    87:             $foun--;
    88:             if ($parm =~ /g/i) {
    89:                 if ($parm =~ /i/i) {
    90:                     $cont =~ s/SoUr${foun}dEsT/$dlis[$foun]/gi;
    91:                 } else {
    92:                     $cont =~ s/SoUr${foun}dEsT/$dlis[$foun]/g;
    93:                 }
    94:             } else {
    95:                 if ($parm =~ /i/i) {
    96:                     $cont =~ s/SoUr${foun}dEsT/$dlis[$foun]/i;
    97:                 } else {
    98:                     $cont =~ s/SoUr${foun}dEsT/$dlis[$foun]/;
    99:                 }
    100:             }
    101:         }
    102:         $foun = 1;
    103:         close FILE;
    104:         print $cont;
    105:     } else { print "Bad luck this time\n"; }
    106: } elsif ($what && $what ne "creafilt" && $what ne "delefilt") {
    107:     if ($what eq "mangfavs" || $what eq "updtfavs" || $what eq "add2favs") {
    108:         print "<html><head><title>PPMT v1.0</title></head>\n";
    109:         print "<body bgcolor=\"#03071b\" text=\"#03feab\"><center>\n";
    110:         print "<h1><a href=\"$this\">PPMT v1.0 ndx</a></h1>\n";
    111:         print "<h2>Favorites</h2>\n";
    112:         if ($what eq "add2favs") {
    113:             open FILE, "<$favs";
    114:             @fvls = <FILE>;
    115:             close FILE;
    116:             @chos = split /\s/, $fvls[0];
    117:             @cvlz = split /\s/, $fvls[1];
    118:             if ($nick !~ /\#?[0-9A-Fa-f]{6}/) { $wich = "Black"; $nick = "#000000"; }
    119:             if ($nick !~ /^\#/) { $nick = "\#" . $nick; }
    120:             if ($wich !~ /\w+/) { $wich = "Black"; }
    121:             $wich =~ s/\n//g; $nick =~ s/\n//g;
    122:             $chos[$#chos] = "$wich"; $chos[@chos] = "end\n";
    123:             $cvlz[$#cvlz] = "$nick"; $cvlz[@cvlz] = "end\n";
    124:             $fvls[0] = " " . join ' ', @chos;
    125:             $fvls[1] = " " . join ' ', @cvlz;
    126:             $fvls[@fvls] = "$wich\n";
    127:             $fvls[@fvls] = "$nick\n";
    128: print "<h2>Adding <i>$wich</i> with value <i>$nick</i> to Favorites!</h2>\n";
    129:             open FILE, ">$favs";
    130:             foreach (@fvls) { print FILE $_; }
    131:             close FILE;
    132:         } elsif ($what eq "updtfavs") {
    133: print "<h2>Updating Favorites!</h2>\n";
    134:             open FILE, "<$favs";
    135:             @fvls = <FILE>;
    136:             close FILE;
    137:             $fvls[0] = " ";
    138:             $fvls[1] = " ";
    139:             $coun = 2;
    140:             while ($fvls[$coun]) {
    141:                 chomp ($kaka = $fvls[$coun++]);
    142:                 if (param("ChooseColor$kaka") eq "YES") {
    143:                     $fvls[0] .= "$kaka ";
    144:                     chomp ($kaka = $fvls[$coun++]);
    145:                     $fvls[1] .= "$kaka ";
    146:                 }
    147:             }
    148:             $fvls[0] .= "end\n";
    149:             $fvls[1] .= "end\n";
    150:             open FILE, ">$favs";
    151:             foreach (@fvls) { print FILE $_; }
    152:             close FILE;
    153:         }
    154:         print "<table border=\"1\"><tr><td>Choose<td>Name<td>Value<td>Example\n";
    155:         print "<td>\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;<td>Choose<td>Name<td>Value<td>Example</tr>\n";
    156:         print "<form action=\"$this\" method=\"post\">\n";
    157:         print "<input type=\"hidden\" name=\"whattodo\" value=\"updtfavs\">\n";
    158:         open FILE, "<$favs";
    159:         $fnmz = <FILE>;
    160:         $fvlz = <FILE>;
    161:         while (<FILE>) {
    162:             chomp;
    163:             print "<tr><td align=\"center\"><input type=\"checkbox\" name=\"ChooseColor$_\" value=\"YES\"";
    164:             if ($fnmz =~ /\s$_\s/) { print " checked"; }
    165:             print ">\n<td>$_<td>";
    166:             chomp ($_ = <FILE>);
    167:             print "$_<td bgcolor=\"$_\">\&nbsp\;\&nbsp\;<td>\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\&nbsp\;\n";
    168:             if ($_ = <FILE>) {
    169: #                chomp ($_ = <FILE>);
    170:                 chomp;
    171:                 print "<td align=\"center\"><input type=\"checkbox\" name=\"ChooseColor$_\" value=\"YES\"";
    172:                 if ($fnmz =~ /\s$_\s/) { print " checked"; }
    173:                 print ">\n<td>$_<td>";
    174:                 chomp ($_ = <FILE>);
    175:                 print "$_<td bgcolor=\"$_\">\&nbsp\;\&nbsp\;\n";
    176:             }
    177:         }
    178:         close FILE;
    179:         print "</table><input type=\"submit\" name=\"submit\" value=\"Update Favorites\"></form>\n";
    180:         print "<form action=\"$this\" method=\"post\">\n";
    181:         print "<input type=\"hidden\" name=\"whattodo\" value=\"add2favs\">\n";
    182:         print "Name: <input type=\"text\" name=\"wichfilt\"><br>\n";
    183:         print "Value: <input type=\"text\" name=\"wichnick\"><br>\n";
    184:         print "<input type=\"submit\" name=\"submit\" value=\"Add Choice\"></form>\n";
    185:         print "<br><h1><a href=\"$this\">PPMT v1.0 ndx</a></h1>\n";
    186:         print "</body></html>\n";
    187:     } else {
    188:         print "<html><head><title>PPMT v1.0</title></head>\n";
    189:         print "<body bgcolor=\"#03071b\" text=\"#03feab\"><center>\n";
    190:         print "<h1><a href=\"$this\">PPMT v1.0 ndx</a></h1>\n";
    191:         if ($what eq "updtseti") {
    192:             $filt = $wich;
    193:             $filt =~ s/^.*\///;
    194:             print "<h2>Updating Filter: <i>$filt</i>!</h2>\n";
    195:             open FILE, ">$wich";
    196:             $wich =~ s/.*\/([^\/]+)/$1/;
    197:             $clim = param("filtcoun");
    198:             $coun = 1;
    199:             $blok = "";
    200:             while ($coun <= $clim) {
    201:                 $parm = param("pArM${coun}PaRm") . param("pAr2${coun}PaR2");
    202:                 $sour = param("sOuR${coun}SoUr");
    203:                 $dest = param("dEsT${coun}DeSt");
    204:                 if (param("pIcK${coun}PiCk") ne "") {
    205:                     $turd = param("pIcK${coun}PiCk");
    206:                     if ($turd =~ /"\#[0-9A-Fa-f]{6}"/) {
    207:                         $dest =~ s/"\#[0-9A-Fa-f]{6}"/$turd/;
    208:                     }
    209:                 }
    210:                 if ($sour ne "") {
    211:                     if ($sour =~ /^"\#?[0-9A-Fa-f]{6}"$/) {
    212:                         if ($dest !~ /^"\#?[0-9A-Fa-f]{6}"$/) {
    213:                             if ($dest =~ /([0-9A-Fa-f]+)/) {
    214:                                 $turd = $1;
    215:                                 $turd = "0" x (6-length($turd)) . $turd;
    216:                                 $dest = "\"\#$turd\"";
    217:                             }
    218:                         }
    219:                     }
    220:                     $sour =~ s/&amp;/&/g;
    221:                     $sour =~ s/&quot;/"/g;
    222:                     $sour =~ s/&lt;/</g;
    223:                     $sour =~ s/&gt;/>/g;
    224:                     $sour =~ s/&brvbar;/\|/g;
    225:                     $dest =~ s/&amp;/&/g;
    226:                     $dest =~ s/&quot;/"/g;
    227:                     $dest =~ s/&lt;/</g;
    228:                     $dest =~ s/&gt;/>/g;
    229:                     $dest =~ s/&brvbar;/\|/g;
    230:                     if ($parm =~ /i/i) {
    231:                         if ($blok !~ /\s$coun\s/) {
    232:                             if ($parm =~ /g/i) { print FILE "g"; }
    233:                             print FILE "i\n$sour\n$dest\n";
    234:                         }
    235:                         $pcou = $coun;
    236:                         while (++$pcou < $clim) {
    237:                             if ($sour eq param("sOuR${pcou}SoUr")) { $blok .= " $pcou "; }
    238:                         }
    239:                     } else {
    240:                         if ($parm =~ /g/i) { print FILE "g"; }
    241:                         if ($blok !~ /\s$coun\s/) {
    242:                             print FILE "\n$sour\n$dest\n";
    243:                         }
    244:                     }
    245:                 }
    246:                 $coun++;
    247:             }
    248:             close FILE;
    249:             $wich = $filp . $wich;
    250:         }
    251:         open FILE, "<$favs";
    252:         chomp ($kaka = <FILE>);
    253:         chomp ($poop = <FILE>);
    254:         close FILE;
    255:         @chos = split /\s/, $kaka; $#chos--; @cvlz = split /\s/, $poop; $#cvlz--;
    256:         $coun = 0;
    257:         while ($coun < @chos) {
    258:             $optn .= "<option value=\"&quot;$cvlz[$coun]&quot;\">$chos[$coun]\n";
    259:             $coun++;
    260:         }
    261:         print "<h2>Settings for <i>$filt</i>:</h2>\n";
    262:         print "<form action=\"$this\" method=\"post\">\n";
    263:         print "<input type=\"hidden\" name=\"whattodo\" value=\"updtseti\">\n";
    264:         print "<input type=\"hidden\" name=\"wichfilt\" value=\"$wich\">\n";
    265:         print "<table border=\"1\"><tr><td>Source<td>Destination<td>Global?<td>Ignore Case?\n";
    266:         open FILE, "<$wich";
    267:         $wich =~ s/.*\/([^\/]+)/$1/;
    268:         $coun = 1;
    269:         while (<FILE>) {
    270:             chomp ($parm = $_);
    271:             print "<tr><td><input type=\"text\" size=\"32\" name=\"sOuR${coun}SoUr\" value=";
    272:             chomp ($kaka = <FILE>);
    273:             $kaka =~ s/"/&quot;/g;
    274:             $kaka =~ s/</&lt;/g;
    275:             $kaka =~ s/>/&gt;/g;
    276:             $kaka =~ s/\|/&brvbar;/g;
    277: #            $kaka =~ s/&/&amp;/g;
    278:             print "\"$kaka\">\n<td><input type=\"text\" size=\"32\" name=\"dEsT${coun}DeSt\" value=";
    279:             chomp ($kaka = <FILE>);
    280:             $kaka =~ s/"/&quot;/g;
    281:             $kaka =~ s/</&lt;/g;
    282:             $kaka =~ s/>/&gt;/g;
    283:             $kaka =~ s/\|/&brvbar;/g;
    284: #            $kaka =~ s/&/&amp;/g;
    285:             if ($kaka =~ /^&quot;\#?[0-9A-Fa-f]{6}&quot;$/) { $kaka =~ tr/a-f/A-F/; }
    286:             print "\"$kaka\">\n";
    287:             if ($coun < 8 && $kaka =~ /(&quot;\#[0-9A-Fa-f]{6}&quot;)/) { #1024
    288:                 $turd = $1; $poop = $optn; if ($poop =~ /="$turd">/i) { $poop =~ s/(="$turd")>/$1 selected>/i; }
    289:                 print "<select name=\"pIcK${coun}PiCk\"><option>$poop</select>\n";
    290:             }
    291:             print "<td><input type=\"checkbox\" name=\"pArM${coun}PaRm\" value=\"g\"";
    292:             if ($parm =~ /g/i) { print " checked"; }
    293:             print ">\n";
    294:             print "<td><input type=\"checkbox\" name=\"pAr2${coun}PaR2\" value=\"i\"";
    295:             if ($parm =~ /i/i) { print " checked"; }
    296:             print ">\n";
    297:             $coun++;
    298:         }
    299:         close FILE;
    300:         print "<tr><th colspan=\"4\">Create New Filter<tr><td><input type=\"text\" size=\"32\" name=\"sOuR${coun}SoUr\">\n";
    301:         print "<td><input type=\"text\" size=\"32\" name=\"dEsT${coun}DeSt\">\n";
    302:         print "<select name=\"pIcK${coun}PiCk\"><option>$optn</select>\n";
    303:         print "<td><input type=\"checkbox\" name=\"pArM${coun}PaRm\" value=\"g\">\n";
    304:         print "<td><input type=\"checkbox\" name=\"pAr2${coun}PaR2\" value=\"i\">\n";
    305:         print "</table><input type=\"hidden\" name=\"filtcoun\" value=\"$coun\">\n";
    306:         print "<input type=\"submit\" name=\"submit\" value=\"Update Settings\"></form>\n";
    307:         print "<br><h1><a href=\"$this\">PPMT v1.0 ndx</a></h1>\n";
    308:         print "</body></html>\n";
    309:     }
    310: } else {
    311:     print "<html><head><title>PPMT v1.0</title></head>\n";
    312:     print "<body bgcolor=\"#03071b\" text=\"#03feab\"><center>\n";
    313:     print "<h1><a href=\"$this\">PPMT v1.0 ndx</a></h1>\n";
    314:     print "<h3>This is PipsPerlMonksThemer.  Please create a new theme.</h3>\n";
    315:     print "<h3>See my settings for examples below.  Please also be courteous and refrain from changing other Monk\'s settings.  If you wish to experiment without creating a new theme, please use the AnonymousMonk theme.  Also note (thanks to Aighearach) when you login, your password is sent directly to PerlMonks.org so your theme settings will be discarded once you login.  I mainly intended this to be a theme specification tool so that we could define and preview different themes for potential implementation as genuine user options.  Thank you very much.</h3>\n";
    316:     print "<h3>Email me (<a href=\"mailto:pip\@BinQ.org\">PipTigger</a>) if you have any comments or recommendations.  TTFN.</h3>\n";
    317:     if ($what eq "creafilt") {
    318:         if ($monk eq "") {
    319:             $monk = "AnonymousMonk";
    320:             unlink "$filp$monk";
    321:             print "<h2>Auto-Deleted && Created New Theme For: <i>AnonymousMonk</i>!</h2>\n";
    322:         } else {
    323:             $monk =~ s/\W//g;
    324:         }
    325:         open FILE, ">$filp$monk";
    326:         $requ = new HTTP::Request GET => "$site";
    327:         $resp = $uage->request($requ);
    328:         if ($resp->is_success) {
    329:             $cont = $resp->content;
    330:             while ($cont =~ /((color="?\#?|\w+="?\#|\w+=")([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})"?)/i) {
    331:                 $whol = $owhl = $1; $redv = $3; $grnv = $4; $bluv = $5;
    332:                 print FILE "\n$whol\n";
    333:                 if (param("autodata")) {
    334:                     if (param("autodata") eq "inverted") {
    335:                         $nred = sprintf "%lx", (255-hex("$redv"));
    336:                         $ngrn = sprintf "%lx", (255-hex("$grnv"));
    337:                         $nblu = sprintf "%lx", (255-hex("$bluv"));
    338:                     } else {
    339:                         $nred = sprintf "%lx", (rand(255));
    340:                         $ngrn = sprintf "%lx", (rand(255));
    341:                         $nblu = sprintf "%lx", (rand(255));
    342:                     }
    343:                     if (length($nred) == 1) { $nred = "0" . $nred; }
    344:                     if (length($ngrn) == 1) { $ngrn = "0" . $ngrn; }
    345:                     if (length($nblu) == 1) { $nblu = "0" . $nblu; }
    346:                     $whol =~ s/(color="?\#?|\w+="?\#)$redv$grnv$bluv"?/$1/i;
    347:                     $whol =~ s/="?\#?/="\#/i;
    348:                     #$whol =~ tr/A-Z/a-z/;
    349:                     $nred =~ tr/a-z/A-Z/;
    350:                     $ngrn =~ tr/a-z/A-Z/;
    351:                     $nblu =~ tr/a-z/A-Z/;
    352:                     $whol .= "$nred$ngrn$nblu\"";
    353:                 } 
    354:                 print FILE "$whol\n";
    355:                 $cont =~ s/$owhl//;
    356:             }
    357: 	    print FILE "\n<FORM METHOD=\"POST\" ACTION=\"index.pl\"\n<form action=\"http://PerlMonks.org/index.pl\" method=\"post\"\n";
    358: 	    print FILE "\n<FORM METHOD=\"POST\"\n<form action=\"http://PerlMonks.org/index.pl\" method=\"post\"\n";
    359:             if (param("autodata") eq "randomal") {
    360:                 $monk = "randomal";
    361:             }
    362:             if ($cont =~ /href=("?)$site\//i) {
    363:                 $sour = $1;
    364:                 print FILE "gi\nhref=$sour$site/\nhref=$sour$this?filt=$monk&$site/\n";
    365:                 $cont =~ s/href=$sour$site\///gi;
    366:             }
    367:             if ($cont =~ /href=("?)\//i) {
    368:                 $sour = $1;
    369:                 print FILE "gi\nhref=$sour/\nhref=$sour$this?filt=$monk&$site/\n";
    370:                 $cont =~ s/href=$sour\///gi;
    371:             }
    372:             if ($cont =~ /src=("?)\//i) {
    373:                 $sour = $1;
    374:                 print FILE "gi\nsrc=$sour/\nsrc=$sour$site/\n";
    375:                 $cont =~ s/src=$sour\///gi;
    376:             }
    377:         } else { print "Bad luck this new time\n"; }
    378:         close FILE;
    379:         @flis = glob("$filp*");
    380:     }
    381:     if ($what eq "delefilt") {
    382:         unlink "$filp$monk";
    383:         @flis = glob("$filp*");
    384:         print "<h2>Deleted <i>$monk</i>!</h2>\n";
    385:     }
    386:     print "<table border=\"1\"><form action=\"$this\" method=\"post\">\n";
    387:     print "<input type=\"hidden\" name=\"whattodo\" value=\"creafilt\">\n";
    388:     print "<tr><td>PerlMonks UserName: <td><input type=\"text\" size=\"32\" name=\"wichmonk\">\n";
    389:     print "<tr><td align=\"center\">InvertColors?: <input type=\"radio\" name=\"autodata\" value=\"inverted\">\n";
    390:     print "<br>RandomizeColors?: <input type=\"radio\" name=\"autodata\" value=\"randomiz\">\n";
    391:     print "<br>AlwaysRandomColors?: <input type=\"radio\" name=\"autodata\" value=\"randomal\">\n";
    392:     print "<td><br><input type=\"submit\" name=\"submit\" value=\"Create New PerlMonks Theme\"></form>\n";
    393:     print "</td></tr></table>\n";
    394:     print "<table border=\"1\"><tr><td>PerlMonk:<td>Change\n";#<td>Remove\n";
    395: 
    396:     foreach $filt (@flis) {
    397:         $kaka = $filt;
    398:         $kaka =~ s/^$filp//;
    399:         if ($kaka ne "randomal") {
    400:             print "<tr><td><h3><a href=\"$this?filt=$kaka&$site\">$kaka</a></h3>\n";
    401:             print "<td><form action=\"$this\" method=\"post\">\n";
    402:             print "<input type=\"hidden\" name=\"whattodo\" value=\"chngseti\">\n";
    403:             print "<input type=\"hidden\" name=\"wichfilt\" value=\"$filt\">\n";
    404:             print "<input type=\"submit\" name=\"submit\" value=\"Settings\"></form>\n";
    405:             #print "<td><form action=\"$this\" method=\"post\">\n";
    406:             #print "<input type=\"hidden\" name=\"whattodo\" value=\"delefilt\">\n";
    407:             #print "<input type=\"hidden\" name=\"wichfilt\" value=\"$filt\">\n";
    408:             #print "<input type=\"submit\" name=\"submit\" value=\"DELETE\"></form>\n";
    409:         }
    410:     }
    411:     print "</table>\n";
    412:     print "<br><form action=\"$this\" method=\"post\">\n";
    413:     print "<input type=\"hidden\" name=\"whattodo\" value=\"mangfavs\">\n";
    414:     print "<input type=\"submit\" name=\"submit\" value=\"Manage Favorites\"></form>\n";
    415:     print "</body></html>\n";
    416: }
    417: #   $requ = new HTTP::Request GET => 'http://razorstorm.net';
    418: #   $requ->content_type('application/x-www-form-urlencoded');
    419: #   $requ->content('match=www&errors=0');
    420: #   my $resp = $uage->request($requ);
    421: #   if ($resp->is_success) { print $resp->content; }
    422: #   else { print "Bad luck this time\n"; }
    

In reply to PipsPerlMonksThemer by PipTigger

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
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? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2022-01-23 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?