Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
how handle these kind of "InMemoryfile" to put this on a local drive

Well, just use a plain file instead!

or to a webserver via HTTP::DAV of (S)FTP ? The transfer programs allways want to have a filename instead a filehandle.

HTTP::DAV implements WebDAV, which is, as the name suggests, an extension to HTTP. HTTP does not know anything about files. So a sane DAV client should be able to upload arbitary data, not just files. And in fact, HTTP::DAV documents for the put method:

One can upload/put a string by passing a reference to a scalar in the -local parameter.

Of course, to access the scalar behind IO::Scalar, you need to pass a reference to a scalar to the constructor IO::Scalar->new(), see IO::Scalar. BTW: You would pass the same reference to HTTP::DAV's put() method.

Net::SFTP implements open, read, write, close. No need to mess with in-memory files, but of course, you could write the scalar used to store the in-memory file using Net::SFTP's write method.

Net::FTP accepts a file name or a file handle for put(), so you should be able to pass the IO::Scalar instance to put().

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^5: in memory files in 5.6.1 by afoken
in thread in memory files in 5.6.1 by mandog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-03-29 04:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found