On Tue, 26 Oct 2004, Dan Fish wrote: > system("myscript.pl arg1 arg2 > myfile.txt"); > > What is the easiest way to prevent "myfile.txt" from being created if > the script dies or produces no output? (It seems the shell will always > create myfile.txt, regardless)
Would it be enough to just delete the file if it's empty? du myfile.txt | grep '^0' && rm myfile.txt That seems easier than any other approach i can think of. -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>