Problem getting 'list' from NET::POP3 to work... 
Author Message
 Problem getting 'list' from NET::POP3 to work...

Does anyone know why this is not working?  Obviously I'm missing
something, I just don't know what it is:

$pop = Net::POP3->new($pop_server);
$pop->login($username,$password) or die "Could not login";
my $msgs = $pop->list;

Perl consistently chokes on line 4.  Why?  The documentation for
Net::POP3 says that the list method returns a hash reference, and based
on my (limited) understanding of references there should not be a
problem with what I'm doing...

...help appreciated, as per usual....

- bill
--
Bill Hutten  db+www



Sun, 08 Sep 2002 03:00:00 GMT  
 Problem getting 'list' from NET::POP3 to work...

Quote:

>$pop = Net::POP3->new($pop_server);
>$pop->login($username,$password) or die "Could not login";
>my $msgs = $pop->list;

>Perl consistently chokes on line 4.  Why?  The documentation for
>Net::POP3 says that the list method returns a hash reference, and based
>on my (limited) understanding of references there should not be a
>problem with what I'm doing...

How about trying to use the hash as %$msgs

$msg is the reference to the hash (e.g. maybe you could think of it as
holding the name of the hash or something)
so %$msg is the hash?

Try
man perlreftut
and
man perlref

Cheerio,

Link.
****************************



*******************************



Mon, 09 Sep 2002 03:00:00 GMT  
 Problem getting 'list' from NET::POP3 to work...


Quote:
>Does anyone know why this is not working?  Obviously I'm missing
>something, I just don't know what it is:

>$pop = Net::POP3->new($pop_server);
>$pop->login($username,$password) or die "Could not login";
>my $msgs = $pop->list;

>Perl consistently chokes on line 4.  Why?

Nothing to do with NET::POP3.

It should read

(note the {} braces instead of () parens).

Cheers
   Andrea



Tue, 08 Oct 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Small '-w' Question with Net::POP3

2. Problems with Net::POP3->list

3. Q: Getting 'cp' command to work

4. Net::POP3 won't authenticate

5. Just Can't, Can't get Net::Telnet to work

6. Perl POP3 Calls to local machine don't work

7. problem with list and get('active')

8. Getting "Subject" in (Net::POP3)

9. Getting "Subject" in (Net::POP3)

10. Getting Perl Modules to work on ISPs that don't allow shell access

11. Getting the password hash (getpw* doesn't work)

12. Beginner's Question: Getting Tk to work...

 

 
Powered by phpBB® Forum Software