in reply to Parsing ICal Format

I'd suggest looking at the DateTime effort. DateTime is an effort to create a 'difinitive' date and time parsing and formatting system. It is in very active development (kind of still in developer status, however I'd say its stable enough to start using). You'll need DateTime, DateTime::Timezone and DateTime::Format::iCal.

To use it all to work with your iCal dates, here's a Synopsis:

use DateTime; use DateTime::Format::ICal; # Convert 'parts' into an iCal: my $DateTimeObject1 = DateTime->new( year=>2003, month=>2, day=>19, hour=>16, minute=>23, second=>22 ); print DateTime::Format::ICal->format_datetime( $DateTimeObject1); #20030219T162322Z # Convert an iCal into parts: my $DateTimeObject2 = DateTime::Format::ICal->parse_datetime('20030219 +T162322Z'); print $DateTimeObject2->year; #2003 print $DateTimeObject2->month; #2 #etc...
Check the DateTime documentation for the piles of other things the DateTime module can do for you. It overrides operators like + and -. If you print the object in scalar format, it will return a string: print "$DateTimeObject2";