Friday, October 28, 2005

A little code

Discovered this just this week. It's very useful. If you want to keep your Perl program from overwhelming your machine when it runs(which it will do quite naturally if it runs a long time and is processing much data) you can enter the following into the start of the file:
1  use Win32::Process;
2 my $proc;
3 Win32::Process::Open($proc, $$, 0);
4 $proc->SetPriorityClass(IDLE_PRIORITY_CLASS);

This will force the program to use the lowest priority when executing. This only works on windows, but I'm sure there's an equivalent for *NIX. The code still executes fairly quickly, unless you are executing some other processor intensive program.

Monday, October 03, 2005

Apropo of nothing.

I give you Grocery Store wars. I've watched this, but not heard it yet. I think it's been around for a while.