hello. I am new to perl and was testing a email module from sample section as below but hitting a wall with the error. I don't know what it means in english.
#!/usr/bin/perl use strict; use warnings; # first, create your message use Email::MIME; my $message = Email::MIME->create( header_str => [ From => 'you@example.com', To => 'joshipv2@gmail.com', Subject => 'Happy birthday!', ], attributes => { encoding => 'quoted-printable', charset => 'ISO-8859-1', }, body_str => "Happy birthday to you!\n", ); # send the message1 use Email::Sender::Simple qw(sendmail); sendmail($message);
Jesses-MacBook-Pro:perl jessep$ ./sendemail.pl Can't locate Email/MIME.pm in @INC (@INC contains: /Library/Perl/5.16/ +darwin-thread-multi-2level /Library/Perl/5.16 /Network/Library/Perl/5 +.16/darwin-thread-multi-2level /Network/Library/Perl/5.16 /Library/Pe +rl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2leve +l /System/Library/Perl/5.16 /System/Library/Perl/Extras/5.16/darwin-t +hread-multi-2level /System/Library/Perl/Extras/5.16 .) at ./sendemail +.pl line 6. BEGIN failed--compilation aborted at ./sendemail.pl line 6. Jesses-MacBook-Pro:perl jessep$
please help a fresh newbie :)

Update I have finally figured the issue and solved it. This program is now working. Thank you Ken and everyone!


In reply to Can't locate Email/MIME.pm in @INC by netperl

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.