Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: tar, system() & pipes?

by BrowserUk (Patriarch)
on Jul 17, 2007 at 20:46 UTC ( #627125=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2023-03-26 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (63 votes). Check out past polls.

    Notices?