That is a "variant" data type. See the docs under Win32::OLE::Variant
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gallagher Timothy-TIMOTHYG Sent: Friday, September 23, 2005 2:00 PM To: [email protected] Subject: Hashes I have a question pertaining hashes. I have a script that gets Outlook calendar information and I an running into some problems. I have this hash : [CODE] $message->{Start}; # start date [/CODE] $message->{START} contains many other values but I do not know what they are. So I try this: [CODE} %start = $message->{Start}; For each $key(keys, %start) { Print "$start[$key] \n"; } [/CODE] I get nothing in return, I know that something is in there because if I say print $message->{Start} -> Date; I get the date or if I print $message->{Start} -> Time; I get the start time. Can anyone tell me what I am doing wrong, here is the rest of the code Thanks, Tim [CODE] use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; # Going to open a file to write too # file location $output = "d:\\outlook_output\\output.txt"; open(FD, "> $output") or die("Cant open $output\n"); my $outlook = Win32::OLE->new('Outlook.Application') or die "Error!\n"; my $namespace = $outlook->GetNamespace("MAPI"); my $folder = $namespace->GetDefaultFolder(olFolderCalendar); my $items = $folder->Items; # print length($folder) . "\n"; for my $itemIndex (1..$items->Count) { my $message = $items->item($itemIndex); next if not defined $message; %start = $message_>{Start}; $start_date = $message->{Start}->Date; $start_time = $message->{Start}->Time; $end_date = $message->{PatternEndDate}; $duration = $message->{Duration}; $subject = $message->{Subject}; $location = $message->{Location}; $categories = $message->{categories}; $sensitivity = $message->{sensitivity}; $body = $message->{body}; #%daysofweek = $message->{getrecurrencepattern}; # spliting off the year and going to see if it is < 2005 @s_date = split(/\//,$start_date); if($s_date[2] < '2005'){ print ""; # Want to make sure the date isnt a Holliday, they seem to have a duration time of 1440 }elsif($duration != "1440"){ print FD "*************************************************\n"; # print FD "Start Date = $start_date\n"; # print FD "Start Time = $start_time\n"; # print FD "Duration = $duration\n"; # print FD "Subject = $subject \n"; # print FD "Location = $location \n"; # print FD "Categories = $categories\n"; # print FD "Sensitivity = $sensitivity\n"; # print FD "Body = $body\n"; # print FD "Daysofweek = " . %daysofweek . "\n"; # print FD "Start** = " . %start . "\n"; # print FD "Recurrence pattern :"; foreach $key (keys %start) { #<----------------- This is the start hash print FD "1" . $key . " " . $start{$key}; } } } close(FD); [/CODE] _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
