Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

mako132 (2925)

Journal of mako132 (2925)

Wednesday June 18, 2003
08:43 AM

My Kind of Kwiki

I've recently moved my personal Wiki from UseMod Wiki to CGI::Kwiki. Both are easy to install, but CGI::Kwiki makes it easy to install multiple Wikis. For example I have a test Wiki where I can monkey around with things. It was as easy as,

cd cgi-bin
mkdir test
cd test

The biggest selling point for me was extensibility of the software and that the data is just text files -- no database, no gdbm, no funky semi-text, no XML. Just fine for personal stuff, debatable if you're considering using it for the enterprise.

So now I run two copies -- one on my office Linux system, reachable over the internet, and a local copy on my Mac OS X laptop. I keep the two in sync by rsync-ing every 15 minutes between 9 AM - 6 PM via a cron job on the laptop. When I have net access, I'm hitting my Linux system, when I don't, I'm plugging away on my local apache on the laptop.

Thursday March 13, 2003
04:04 PM

Automating PowerPoint to HTML

A step in our Distance Education production process is the converting of PowerPoint slides to HTML. We've been doing this manually.

We're looking to save time by automating this -- having instructors email or upload the presentation, automatically convert it and transfer it to the right server.

Over a year ago, I discovered and purchased PPT2HTML (, a VB program which implements a 'watched' dropbox and configuration templates and does the automatic conversion. Naturally, I'd rather do this with Perl, so I have complete control.

I attempted it a year ago, but stuck when it turns out that Office97's PowerPoint doesn't have an OLE interface to saving as HTML.

But this week, perhaps due to luck, I discovered that later Offices (at least OfficeXP) has the interface now and I stumbled upon a Javascript/ActiveX snippet that did a simple conversion. I ran with that and Win32::OLE and now I'm rocking and rolling.

Before I was rockin' and rollin', I lurchin' and reelin' trying to use Win32::API to import ppt2html.dll (Office97's Internet Assistant). I made baby steps, but never got any output.

Why bother with Office97? Because the converted HTML is so much cleaner way back then. Now Microsoft's HTML conversion produces monster files bloated with every [XD]HTML feature and Microsoft extension in an attempt to duplicate the exact look of a PowerPoint Presentation in Internet Explorer.

So I intend to snag the images and text from the OfficeXP conversion and roll them into HTML::Template's built from a representative Office97 conversion. I know people have also written filters to clean up the Microsoftisms from an HTML conversion, so I'll try those too.

Monday February 10, 2003
04:45 PM

Master of Multitasking

Process 1: doing the budget (about 20 line items)

Process 2: building a new Oracle installation

Process 3: running test suite on our authentication system

Process 4: helping new consultant set up his system

Process 5: banging on the RT tickets

Results? Oracle machine down, can't remotely access it after rebooting, consultant frustrated, RT tickets blowing in the wind, budget deadline missed, lunch missed, forced to drink Diet Vanilla Coke.

Friday February 07, 2003
12:42 PM

Spam Sounds

Recommended listening: The videos of presentations from the first Spam Conference over at MIT (a couple of weeks ago) at

There's 4 webcasts of people giving short talks (10 minutes), so if one bores you, fast forward to the next.

12:36 PM

system() bites us

Talk about having to read between the lines.

Our sys admin was trying to get this to work:

@args = ("/usr/local/bin/ldapmodify","-a -n -x -w", $pass,"-H $url", "-f $file");

print "@args";

The system call would fail (illegal option -), but when he copied and pasted the output of the print statement to a shell, it worked.

We kept thinking "there's more than one argument to system(), so it's not going through /bin/sh before being exectuted...".

After reading the perldoc for system() and then the man page for execvp(), we realized what was happening was that ldapmodify was being told that it's first argument was "-a -n -x -w", and of course it wasn't subsequently breaking it apart into pieces...because it expected that the shell already did that.

So, even thought the perldoc for system says to place each argument into @args, it doesn't stress strongly enough that every single argument must be an element of the array:

@args = ("/usr/local/bin/ldapmodify","-a", "-n", "-x", "-w", $pass,"-H", $url", "-f", $file);

Thursday February 06, 2003
11:19 PM

Walking Up the Mason Learning Curve

Now converting my personal homepage into Mason. The idea is to write an autohandler that wraps some navigation around my pile of disorganized pages, without having to edit any my already existing pages. I'm sure I'm not the first to do this...I've got the Mason book at the office and refer to the online version at home.

I tried to start folding in log4perl into our authentication module, but got bogged down making slight tweaks and solidfying the test scripts, all the while installing Oracle on another server.

Starting to flesh out some of the possible components in our upcoming rewrite of our video production system.

Tuesday January 28, 2003
11:31 AM

Perl Through Java Eyes

A Java programmer working in Perl was having a hard time debugging a for loop

for ($i=0,$t_inner=$t_pos;$i<$t_inner;$i++,$t_inner++){
        $sub_date[$t_innner] = $date[$i + $t_sub];

        $sub_list[$t_inner] = $date[$t_sub];

What struck me (besides his lack of use strict and the t_innner != t_inner typo) was how hard it is to read such code from someone who is used to manipulating arrays the hard way.

Wednesday December 11, 2002
04:16 PM

I've Got Mine!

My 1GHz Powerbook arrived yesterday. Yeehaw!

But I've been a life-long Mac user, with MacOS X as my office desktop machine for quite a while so there's no news there.

I've just got something new and shiny, that's all.

Wednesday December 04, 2002
10:53 AM

Jump In, The Water's Warm!

With HTML::Mason book in hand, I take the plunge back into Mason. I tried it a few years ago, but got confused by dhandlers and autohandlers, and ended up using PHP instead.

PHP is nice and lightweight but its limited, semi perl-like syntax annoys me. But I'm not knocking PHP - I've got several important apps using it.

My initial goal - to take control of my personal site, which is becoming a black hole of lost pages.

Tuesday December 03, 2002
02:52 PM

Agghh! RedHat Bites Me!

Spent two and a half hours trying to simply get CGIs working on a RedHat 8 system. I've done this a zillion times on various Unix platforms.

Turns out suEXEC is on by default. Since I never use it, it probably wasn't configured as I needed it or my CGIs weren't using it right. Turned it off and everything works.

Not what I needed, returning from vacation with a pile of work to do.