Hi again, I'm digging out this thread cause it seems that my problem has been only partially solved. Indeed "my @myout = `program file`;" can save the output of my program to an array for parsing but this doesn't happen when I use programs with output that cannot be redirected to a file (i.e. error messages). In my first message I describe how I can achieve that in bash using the >$ operator :
apbs input.in >$ output.txt # '>' doesn't work here How can I block the output of that program when invoked from a perl script? The case here is that this script is run by a java program multiple times concurrently, and the java program also reads it output using buffered readers which overflow with useless data printed by apbs program as shown above, which results to a crash. thanks in advance, Tom 2009/2/19 Wagner, David --- Senior Programmer Analyst --- CFS < david.wag...@fedex.com> > > > > > You can do undef @myout; > but it really depends upon what system you are running under and how > they handle the release of memory. This should cutdown, but you could > also use brackets like: > > { > my @myout = `program file`; > # now process what is in @myout and either save to > another arry which you want to write eventually or > # write to a file with the necessary data that meets > your criteria > > } > after the }, the my @myout would be released > >