Hi Guys: I havnt coded in perl for a while, so forgive my rustyness. Im writing a quick and dirty snippet that logs into a POP3 server, and retreives the header of the last message in the box. Now, I got the number of the last message, but when I try to get the head, it returns a reference to an array. eg.
sub pop_header { @popst = $pop->popstat(); $popnum = $popst[0]; print "Header of message $popnum being retreived.\n"; @array = $pop->top($popnum); print "@array\n"; }
This give the following output.
Header of message 23 being retreived. ARRAY(0x2cbf0)
How do I get the actual header rather than this reference. I know this is probably obvious... -Chris

In reply to POP3 in libnet by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.