nisha has asked for the wisdom of the Perl Monks concerning the following question:
The value is collected in a variable @Postdate, printing only @Postdate returns a values like this ARRAY(0x422f2d8. In order to dereference it i tried to access every item in the array and used @$i; on printing this the value that got printed is Win32::OLE::Variant=SCALAR(0x422f4b8). Another observation that was made is this was seen only in case where the return value is in date format. if in place of PostedDate, Subject field was specified which is a string, i was able to print the value of subject field correctly using the same program. Please let me know if i am missing out on something. Thanks, Nisha#!/usr/bin/perl use Win32::OLE; $server = $ARGV[0]; my $notes_dead = Win32::OLE->new('Notes.NotesSession') or die "Cannot +open Notes Session, $!"; print "The notes_server is : $server \n"; my $database_dead = $notes_dead->GetDatabase( $server,'mail\\admin.nsf +' ); my $view_dead = $database_dead->GetView('$Inbox'); my $ndoc_dead = $view_dead->GetFirstDocument; while ( $ndoc_dead ) { $nDocCount +=1; my $sub = $ndoc_dead->GetFirstItem("Subject"); my $deadlocation = $sub->text; #print $ndoc_dead->GetFirstItem("PostedDate"); my @Postdate = $ndoc_dead->GetItemValue("PostedDate"); print @Postdate , "\n"; foreach $i (@Postdate) { print @$i , "\n"; } $ndoc_dead = $view_dead->GetNextDocument($ndoc_dead); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with references
by Polonius (Friar) on May 11, 2006 at 09:47 UTC | |
|
Re: Problem with references
by Errto (Vicar) on May 12, 2006 at 00:41 UTC |