jakev383 has asked for the wisdom of the Perl Monks concerning the following question:
And I get this error:# slurp the email from STDIN my( $raw ); { local $/ = undef; local *FILE; open FILE, "-"; $raw = <FILE>; close +FILE } defined( $raw ) or die( "Nothing read from STDIN!\n" ); # Create an IO::Handle for Mail::DKIM::Verifier to read message from my( $raw_iohandle ) = new IO::Scalar( \$raw ); # Read from the IO::Handle my( $mail ) = load Mail::DKIM::Verifier->new(); $mail->load( \$raw_iohandle ); $mail->CLOSE; # Import message to Email::Simple my( $incoming ) = Email::Simple->new( \$raw );
It's almost painfully obvious that I am trying to get the message into $mail incorrectly, but I do not see what I am doing wrong. Can someone show (and explain!) what I am doing wrong?Use_of_uninitialized_value_in_<HANDLE>_at_/usr/lib/perl5/site_perl/5.8 +.8/Mail/DKIM/Common.pm_line_87./readline()_on_unopened_filehandle_at_ +/usr/lib/perl5/site_perl/5.8.8/Mail/DKIM/Common.pm_line_87./Can't_use +_string_("Mail::DKIM::Verifier")_as_a_HASH_ref_while_"strict_refs"_in +_use_at_/usr/lib/perl5/site_perl/5.8.8/Mail/DKIM/MessageParser.pm_lin +e_88./
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with IO::Scalar and piping
by Corion (Patriarch) on Sep 26, 2009 at 17:50 UTC | |
by jakev383 (Initiate) on Sep 27, 2009 at 11:52 UTC | |
by Corion (Patriarch) on Sep 27, 2009 at 12:01 UTC | |
by jakev383 (Initiate) on Sep 27, 2009 at 13:15 UTC | |
by Corion (Patriarch) on Sep 27, 2009 at 15:13 UTC | |
| |
by ikegami (Patriarch) on Sep 27, 2009 at 17:34 UTC |