in reply to Re^2: redirect output from a command to another command
in thread redirect output from a command to another command

Allasso:

If you write to the file, and then use and delete it shortly thereafter, it may not even get written to the disk at all. It may simply reside in memory buffers. So don't be afraid of short-term temporary files. They can even be handy debugging tools--just comment out the delete, so you can see what the intermediate results were in an operation.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re^3: redirect output from a command to another command

Replies are listed 'Best First'.
Re^4: redirect output from a command to another command
by Allasso (Monk) on Mar 09, 2011 at 23:11 UTC
    yes, by the results I was seeing, I had a feeling that that was what was happening, ie, they weren't even going to disk. I was getting caught in the paradigm that only variables resided in memory.

    Another paradigm that I am wondering if it is fallacious is that calling a system command is more expensive than using a module. Is there really a (significant) difference between forking a process and executing code that is written in from a module? If there is a slight cost to forking, it doesn't seem like it would be that significant. Some one enlighten me.

    Anyway, looking at the results of my tests, it is hard to convince me that there is anything to be gained by using Algorithm::Diff, as far as speed goes. Portability, perhaps, as some have pointed out.