Re: Count messages in a Imap-Mailfolder

[email protected] (Gunnar Hjalmarsson)
Newsgroups perl.beginners
Message-ID <[email protected]>
Michelle Konzack wrote:
> Am 2008-06-02 17:34:30, schrieb John W. Krahn:
>> According to the documentation for that module:
>>
>>     list
>>           my $message_size  = $imap->list($message_number);
>>           my $mailbox_sizes = $imap->list;
>>
>>         This method returns size information for a message, as indicated
>>         in the single optional parameter, or all messages in a mailbox.
>>         When querying a single message a scalar value is returned. When
>>         listing the entire mailbox a hash is returned. On failure,
>>         "undef" is returned.
>>
>> So if you use list() with no message number supplied it will return a 
>> *reference* to a hash that contains the message numbers as the keys and 
>> the corresponding message sizes as the values.
> 
> Since I am begining to learn Perl, how do I get the Value from the hash?

     perldoc perlreftut
     perldoc perlref

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.