• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quoted-Printable Perl Module
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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?

\*STDIN, \*STDOUT

The original code seems to work fine with bare STDIN & STDOUT, but I'm sure this idiom is there for a reason.

TIA.

--
Take Care,
Chris

 _______________________________________________
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

  • Follow-Ups:
    • Re: Quoted-Printable Perl Module
      • From: debt <email@hidden>
References: 
 >Quoted-Printable Perl Module (From: Christopher Stone <email@hidden>)
 >Re: Quoted-Printable Perl Module (From: debt <email@hidden>)

  • Prev by Date: Re: Quoted-Printable Perl Module
  • Next by Date: Saving a New Document with PDFPenPro
  • Previous by thread: Re: Quoted-Printable Perl Module
  • Next by thread: Re: Quoted-Printable Perl Module
  • Index(es):
    • Date
    • Thread