in reply to Using scalar instead of file handle in MIME::Decoder

IO::Wrap does not do what you think it does. You want IO::String, IO::Scalar or open(..., \$text). The last one is best, but only works in Perl 5.8.0 and higher.
my $in_text = '...'; my $out_text; open(my $in_fh, '<', \$in_text) or die("Unable to create input file handle from string: $!\n"); open(my $out_fh, '>', \$out_text) or die("Unable to create output file handle from string: $!\n"); my $decoded = $decoder->decode($in_fh, $out_fh);

Replies are listed 'Best First'.
Re^2: Using scalar instead of file handle in MIME::Decoder
by Popcorn Dave (Abbot) on Oct 29, 2006 at 00:14 UTC
    Thank you! That's one problem down... :)

    Revolution. Today, 3 O'Clock. Meet behind the monkey bars.