Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: in memory files in 5.6.1

by bart (Canon)
on Oct 26, 2003 at 10:45 UTC ( #302191=note: print w/ replies, xml ) Need Help??


in reply to in memory files in 5.6.1

I have a script that tars a bunch of files. It would be nice to put them in a directory before tarring them and the end user doesn't want to create temporary files.
If you create the archive using Archive::Tar, you don't need to store the "files" as actual, physical files first. You can just add them to the archive in memory. See add_data().

Hmm. I'm a bit surprised to find that, if the source is indeed physical files but you want to archive it in a different location in the stored file tree, it provides no way to do just that. You can rename() the member file, after you added it, I suppose — but only if your version of the module is recent enough.


Comment on Re: in memory files in 5.6.1

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://302191]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2015-07-04 20:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls