mandog has asked for the wisdom of the Perl Monks concerning the following question:
# [...] File handles can be opened to "in memory" files held in Perl scalars via: open($fh, ">", \$variable)
Is there a way to open files in memory in Perl 5.6.1. ?
A lot of our test code does kludgy stuff like write test files to /tmp
On related note is there a good module or technique for Perl 5.8 that allows a RAM based dir ?
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. I've taken a quick look through CPAN but nothing jumped out at me. Please feel free to point out something I've overlooked
update: By "RAM based file system" I mean soemthing like: "not on physical disc", something that nothing but root with a debugger and my program can access.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: in memory files in 5.6.1
by liz (Monsignor) on Oct 25, 2003 at 19:07 UTC | |
by pg (Canon) on Oct 25, 2003 at 19:25 UTC | |
by mandog (Curate) on Oct 25, 2003 at 20:07 UTC | |
by hanenkamp (Pilgrim) on Oct 25, 2003 at 20:33 UTC | |
by WolliK (Acolyte) on Apr 04, 2016 at 14:20 UTC | |
by afoken (Chancellor) on Apr 04, 2016 at 20:31 UTC | |
| |
Re: in memory files in 5.6.1
by etcshadow (Priest) on Oct 26, 2003 at 00:35 UTC | |
Re: in memory files in 5.6.1
by nevyn (Monk) on Oct 26, 2003 at 08:11 UTC | |
Re: in memory files in 5.6.1
by bart (Canon) on Oct 26, 2003 at 10:45 UTC | |
Re: in memory files in 5.6.1
by mce (Curate) on Oct 29, 2003 at 10:06 UTC | |
Re: in memory files in 5.6.1
by Anonymous Monk on Aug 22, 2007 at 18:02 UTC |