is an overly complex way of doing# slurp the email from STDIN my( $raw ); { local $/ = undef; local *FILE; open FILE, "-"; $raw = <FILE>; close +FILE }
# slurp the email from STDIN my $raw; { local $/; $raw = <STDIN>; }
Why are you forcing a list assignment?
should bemy( $raw_iohandle ) = new IO::Scalar( \$raw );
my $raw_iohandle = new IO::Scalar( \$raw );
But then again, IO::Scalar is not nearly as robust as the native support for scalar handles added to 5.8
open(my $raw_iohandle, '<', \$raw );
Finally, if the module expects a system file handle (e.g. if it attempts a child process to read from it), it'll be disappointed by your attempts since none of the Perl file handles you are producing have a system file handle associated with it.
In reply to Re^3: Help with IO::Scalar and piping
by ikegami
in thread Help with IO::Scalar and piping
by jakev383
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |