Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have the email with the attachment saved on my Disk (in a folder).. I want to pass this to the Perl script which will separate the email attachment. I have got the perl script to separate email attachments but it reads from STDIN.. Any method to feed the input instead of using stdin

Replies are listed 'Best First'.
Re: Email Attachment
by Corion (Patriarch) on Jan 07, 2016 at 19:54 UTC

    See MIME::Parser. Also, if a script can read from STDIN, you can feed it from a file.

Re: Email Attachment
by hippo (Archbishop) on Jan 07, 2016 at 20:27 UTC
    $ script.pl < diskfile.dat

    or edit your script and use open