Re: Store each lines from a response...

"Mumia W." <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
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.
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.