I have a problem: this part of code counts the documents in the notes database. After that he should print the subject text from each document, but it doesn't work. why? Please help !
# öffnet Notes und zählt die Dokumente in der Inbox use Win32::OLE; my $Notes = Win32::OLE->new('Notes.NotesSession') or die "Cannot start + Lotus Notes Session object.\n"; my ($Version) = ($Notes->{NotesVersion} =~ /\s*(.*\S)\s*$/); print "The current user is $Notes->{UserName}.\n"; print "Running Notes \"$Version\" on \"$Notes->{Platform}\".\n"; $Database = $Notes->GetDatabase('', 'help4.nsf'); $Database -> OpenMail; $Inbox_view = $Database -> GetView('($Inbox)'); $inbox_documents = $Inbox_view -> AllEntries; $Count = $inbox_documents -> {Count}; print "There are $Count documents in the database.\n"; for (my $Index = 1 ; $Index <= $Count ; ++$Index) { my $Document = $inbox_documents->GetNthDocument($Index); print $Document->{Subject}->{Text},"\n"; my @Values = $Document->{Index_Entries}; foreach my $Value (@Values) { print " Index: $Value\n"; } last unless $Index < 10; }

20050422 Cleaned up by Corion: Changed <br> tags to newlines


In reply to notes perl problem by cybär

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.