http://qs1969.pair.com?node_id=627125


in reply to Re^2: tar, system() & pipes?
in thread tar, system() & pipes?

If the intention is to read the output file back into your program once tar is finished, you could bypass the filesystem by using a piped-open:

(See the docs for perlfuncopen and perlopentut)

# ..................v open TAR, "tar .... |" or die ...; while( <TAR> { ## do stuff with the tar output }

## do stuff with the tar output could be as simple as print FILE $_;.

See also IO::Pipe.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.