See inline.
------------------------------------------------
On Fri, 3 Jan 2003 00:23:01 +0100, "Mark Troyer" <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> Perhaps someone can help me understand what I am doing wrong. I am
> trying to write a program that will manipulate my various POP3 mail
> boxes on the net. I seem to be having a problem with the get method in
> the Net::POP3 module. I am trying to read a message into an array and
> then print each message in the array. The print command only seems to
> give me the scalar value to the array and the characters in the array.
> Here is the test program I have created. Can someone give me a quick
> pointer to what I am doing wrong?
>
> Thanks!
>
> Mark
>
> #!/usr/bin/perl
>
> use Net::POP3;
> use strict;
>
> my $username = 'foouser';
> my $password = 'secret';
> my $host = 'pop.foo.com';
>
> print "creating handel\n";
> my $h=Net::POP3->new($host);
>
> print "setting username\n";
> $h->user($username);
>
> print "setting password\n";
> print("there are ", my $last=$h->pass($password), " messages\n\n") ;
>
> my @message = $h->top(1);
>
my $message = $h->top(1);
It appears 'top' returns a reference to an array rather than an array.
> while (@message) {
while (@$message) {
> print $_;
> }
>
> $h->quit();
>
>
> exit(0);
>
This should help if the docs are correct, but I haven't done development with this
module yet.
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]