in reply to Re: using arguments
in thread using arguments

yes that perltst is a file

Replies are listed 'Best First'.
Re^3: using arguments
by dHarry (Abbot) on Dec 19, 2008 at 11:26 UTC

    From the documentation:

    Mail::Internet->new([ARG], [OPTIONS]) ARG is optional and may be either a file descriptor (reference to +a GLOB) or a reference to an array. If given the new object will be i +nitialized with headers and body either from the array of read from t +he file descriptor.

    Under the assumption that your file is in the right format you could construct a file descriptor to the file and pass that into the constructor.

      the most irritating thing is that I need the code of perltst in hash. not in glob... and I can't find a way to do that

      + I don't everything understand what I find because I'm a newbie in perl

        See The Evolution of Perl Email Handling for an example based on a reference to an array. I don't know what your file looks like. Maybe you should post the content of the file. Putting the file content in an array and passing the reference to it in the constructor should be straightforward. e.g.

        my @message = <FH>; Mail::Internet->new( \@message );