I have a small program that scans Apache log files for certain "evil" patterns and then blocks those IP addresses from server (not just Apache).
But as these log files grow and grow, the CPU percentage keeps going up.
When I restart Apache after clearing log files, problem goes away, until size...
I am trying to bring LaTeX::Encode into a port of OpenBSD.
But OpenBSD has a version of TAP::Harness in base, version 3.23, which has the method _construct
But there is also a package TAP::Parser that has TAP::Harness, version 0.54, which does not have the _construct method.
The test suite for...
I want to write tests for my application that views (with searches), inserts and updates a PostgreSQL database. I need to test the web side to see if inserts and updates chain up and down through the tables. I also need to test the database side to see if those changes actually reflect web side...
I am generating two select lists from perl.
One shows a class drop down list.
The second one shows a subclass drop down list.
To make life easier, this makes only subclasses that are in a class show up after selecting a class.
Works good. I just rewrote the perl subroutine that generates this...
I am trying to accomplish two things, speed and readability.
I have moved from an if elsif list of options to this:
# earlier:
my @available_commands # In modules
= qw(ViewRecords
InsertRecordGroupForm
UpdateRecordForm
InsertRecordGroup
UpdateRecord...
I am having a problem with the following puzzle.
The first version works fine, the second fails.
Is there a way to successfully make the if version work?
unless ( $command eq "ViewRecords"
|| "InsertRecordGroupForm"
|| "UpdateRecordForm"
|| "InsertRecordGroup"
||...
I am searching for different items of interest to then get full details later.
I want to look at details for each individual item, but my search produces two useful fields, both of which have duplicates, but (usually) a combination of the two fields produces a unique item.
field1 = 97865...
I am trying to get paypal IPN script to work.
PayPal sends me a a list of variables an a normal POST.
I then send that back to PayPal.
All is good so far.
If everything is OK, PayPal than sends me back a POST that contains nothing at all except VERIFIED.
This is a page that is text.html and...
I have a tree of tables.
At the top is a particular complete object, say a building. that table only lists the item's name, price and category. This item is derived from a table that lists all of the sub-assemblies that make up the item, say a wall. Those sub assemblies are used in many...
I have a command line script that works great.
I use it to search for new things at certain sites.
Since it is not local, I decided that it would be great to move it to my web server, which is strictly mod_perl, apache 1.3 and chrooted.
Everything else already has a web app, this would...
I have an existing database of products with prices and vendors,etc.
A script updates prices 1-4 times a month.
I now want to add a set of tables to describe an assembly of parts to make specific project items like a floor or wall of a particular size
Each project, like a 12' x 20' Floor will...
I use a script to pull prices out of some websites to save time and avoid all that visual crap. One site has changed their pricing to images using javascript. After studying the output through several browsers (firefox, lynx, elinks, curl, wget), I discovered something odd. There isn't any link...
I have an existing database of prices of construction materials from various vendors which is updated regularly.
(Designed and installed by me)
I get a lot of interest in one particular item, a small portable cabin/efficiency. With the economy slow now, I want to get quick estimates on a...
I need to have three different locations on my site that have different cookies using Apache::AuthCookie.
I have had no trouble getting it to work well using the example form mod_perl cookbook, but now that I have added two new locations, I am getting the wrong cookie after a login attempt and...
I am having trouble figuring out the right regex for this.
I have:
if ($line =~ /s\.prop1="([\w\s,.-\/i"'+\(\)&%#=:]+)";/) {
I am trying to find lines that meet the requirements for a product description. Those lines may hold any alphanumeric and most punctuation characters.
The correct line...
I have a problem with vim-gtk causing an X crash when accidentally starting it outside a terminal. Long story but the window managers are at fault.
I have made a simple script to test for a terminal if vim command is used, if okay, then start renamed vim executable (vim-safe).
# cat...
When I run this first time, with no values from form, I get $article_file being a / when it should be nothing. I just can't see the error. I have tried variations with \w and dash at begiining and end, but no go.
#!/usr/bin/perl
$VERSION = 1.0.0;
use warnings;
no warnings 'uninitialized'...
I tried to figure out how to solve this problem with a shell script, but I finally gave up and figured out how to do it with perl.
I would still like to know how to do it without perl, though.
I have a crappy sound card that has poor support(no volume control) under OpenBSD.
In OpenBSD, mplayer...
I am trying to patch Text::Autoformat to get a working man page and perldoc
# perldoc Autoformat.pm
Got a 0-length file from Autoformat.pm via Pod::Perldoc::ToMan!?
I also checked /usr/ports/pobj/p5-Text-Autoformat-1.12p0/Text-Autoformat-1.12/blib/lib/Text/Autoformat.pm
and...
I am using this and several other similar functions to rename files and directories, changing spaces to underscores, remove repeated dashes, underscores, and changing to title case.
foreach my $file (@change_these) {
next if $file =~ /^\.\.?$/; # skip . and ..
chomp $file;
my $newfile =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.