Wednesday, November 12, 2008

Linux Kernel Modules

Just some info about Linux kernel modules. This faq gives some small examples to write. I'm just jotting it down because it's something I'd like to know a little more about in the future:

http://www.faqs.org/docs/kernel/x571.html

Tuesday, November 4, 2008

Perl and Dates

Just a quick code snippet I through together to remember some of the date parsing modules that seem to come standard with Perl 5:

use Date::Parse;
use Date::Format;
use strict;

my $date = "2008-12-30 05:00:00";
my $machine_time = str2time($date);
my $week = time2str("%U", $machine_time);
my $month = time2str("%L", $machine_time);

print < < EOF;

Date is: $date
Machine Time is: $machine_time
Week is: $week
Month is: $month

EOF