Re: Quoted-Printable Perl Module
Re: Quoted-Printable Perl Module
- Subject: Re: Quoted-Printable Perl Module
- From: Christopher Stone <email@hidden>
- Date: Thu, 16 Mar 2017 22:11:43 -0500
On Mar 16, 2017, at 21:18, debt <email@hidden> wrote:
I don’t have a way to test this here, but won’t it accept a reference to your in and out scalars?
$decoder->decode(\$in, \$out);
Hey Marc,
No, it doesn't like that at all... :)
#!/usr/bin/env perl -sw use MIME::Decoder;
my ($textInput, $textOutput);
$textInput = q( FIND/REPLACE: ~s/=E2=80=9D|=E2=80=9C/\"/g; ~s/=E2=80=98|=E2=80=99/\'/g; ~s/=E2=80=93/\--/g; ~s/=E2=80=A6/\.../g; );
$decoder = new MIME::Decoder 'quoted-printable' or die "unsupported"; $decoder->decode(\$textInput, \$textOutput);
print $textOutput;
Error:
Can't call method "getline" on unblessed reference at /opt/local/lib/perl5/vendor_perl/5.24/MIME/Decoder/QuotedPrint.pm line 112.
Can you clue me in to the meaning of the prefixes to std(in/out) ( \* ) in this line?
The original code seems to work fine with bare STDIN & STDOUT, but I'm sure this idiom is there for a reason.
TIA.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden