On 03/27/2007 08:59 PM, geist wrote:
Hello,
I'm not sure if it's the right place but it has something to do with
www library and other net libraries.
Here is my code :
my $pop = Net::POP3->new($server, Timeout => 60);
if ($pop->login($login, $passwd) > 0) {
my $msgnums = $pop->list;
foreach my $msgnum (keys %$msgnums) {
my $msg = $pop->get($msgnum);
print "My mail -> @$msg\n";
}
}
I want to split each lines of my mail (stored into @$msg)
Well, $msg is the reference of the array storing the mail response, Am I
right ?
So when i use @$msg i'm getting the value the array reference with
$msg ? Still right ?
So why when i'm trying to use 'split('\n',@$msg);' i got returned a
'weird' number ?
The documentation for Net::POP3 suggests that $msg already contains the
message data split into lines; $msg is a reference to an array
containing the required data (already split), so there is no need to split.