First of all some general remarks:
- add
use strict;
- add
my
in the loopforeach my $eventstring (@events) {
and remove it from below linemy $eventstring =~ s/(\d+\.\d+\.\d+)//;
- as a good practice, try to avoid the bareword
FILE
and define the filehandle as a scalar variableopen my $FILE,$ARGV[0]
So now, to answer your question, import those 2 modules...
use Data::ICal::Entry::FreeBusy;
use Data::ICal::Entry::Alarm::Display;
...and I believe you have to add the following to your code:
my $event = Data::ICal::Entry::Event->new();
$event->add_properties(
summary => "Kolloquium: $title",
description => $eventstring, #+and the long description
dtstart => Date::ICal->new( year=>"20$year", month=>$month, day=>$day, hour=>17, min=>15 )->ical,
dtend => Date::ICal->new( year=>"20$year", month=>$month, day=>$day, hour=>18, min=>15 )->ical,
dtstamp => Date::ICal->new( epoch => time )->ical,
);
my $vfreebusy = Data::ICal::Entry::FreeBusy->new();
$vfreebusy->add_properties(
organizer => 'MAILTO:jsmith@host.com',
freebusy => Date::ICal->new( epoch => ... )->ical . '/' . Date::ICal->new( epoch => ... )->ical, #don't forget to define the time!
);
my $valarm = Data::ICal::Entry::Alarm::Display->new();
$valarm->add_properties(
description => "Wake up!",
trigger => [ Date::ICal->new( epoch => ... )->ical, { value => 'DATE-TIME' } ], #don't forget to define the time!
);
$calendar->add_entry($valarm);
$calendar->add_entry($vfreebusy);
$calendar->add_entry($event);