Re: Using scalar instead of stream



Daniel Kaplan wrote:
> If a module asks for a readable filehandle (input stream) as below, surely
> there is a way to use a scalar instead?

On what basis do you make that logical leap?

A module can only do what it was programmed to do.

> The module is looking for an email message, which I already have loaded into
> one string?

"The module"? Are you assuming there's only one? Why don't you give
us enough information to help you? What module are you using?

> $entity = $parser->parse(\*STDIN) or die "parse failed\n";

How does this relate to your statement above? There is no string here
to which you have loaded an email message.

Are you *ever* going to bother reading the Posting Guidelines for this
group? What is difficult about posting a short-but-complete script
that demonstrates your problem?

Paul Lalli

.



Relevant Pages

  • Re: CAN You help Re: Writing dictionary output to a file
    ... import string, StringIO ... for w in msg: ... I have a piece of code, which does check for matching ... word in the email message by comparing with the words ...
    (comp.lang.python)
  • Re: Regexp slowdown
    ... Well, neither do we, as you refuse to show this regex. ... Please read the posting guidelines for this group to learn how you can ... It is easy to write a stupid regex that will just waste time doing ... different ways of partitioning a string of length n between the "+" ...
    (comp.lang.perl.misc)
  • Re: Trying to use Request.ServerVariables("remote_addr")
    ... I am trying to pass the ip address of a sending web client in the body of an email message. ... //assign string value to message body ... //create the smtp client ...
    (microsoft.public.dotnet.framework.aspnet)
  • Email Cmd
    ... I have a Command that generates an email message as follows: ... Dim strMessage As String 'Body of message ... Dim strSubject As String 'Email Subject ...
    (microsoft.public.access.formscoding)
  • Re: Interpolations within system()
    ... That is a single quoted string you are passing to system. ... Do read the posting guidelines for this group. ... Sinan Unur ...
    (comp.lang.perl.misc)