Thank you David. A typical output file comprises ~200 lines. Most of those files are useless and thus the arrays that contain theirs lines will occupy extra memory. I am running many such scripts concurrently which invoke similar processes several times so I'm wondering if there is a way to erase those arrays from memory upon completion of the execution.
thanks in advance, Thomas 2009/2/19 Wagner, David --- Senior Programmer Analyst --- CFS < david.wag...@fedex.com> > > -----Original Message----- > > From: Thomas Evangelidis [mailto:teva...@gmail.com] > > Sent: Thursday, February 19, 2009 08:27 > > To: beginners@perl.org > > Subject: calling a program from a perl script and redirecting > > to output to a file > > > > Dear Perl programmers, > > > > I want to run a program from a perl script and redirect the > > its output to a > > file. The programs is called apbs and takes 1 argument, so in > > unix shell I > > 'm simply typing the following: > > > > $apbs input.in >$ output.txt # '>' doesn't work here > Unless the output is trully large, I use somehting like: > > my @myout = `$apbs input.in`; > Then I parse what is in the array. I have number of processes that I do > this way. > If you have any questions and/or problems, please let me know. > Thanks. > > Wags ;) > David R. Wagner > Senior Programmer Analyst > FedEx Freight > 1.719.484.2097 TEL > 1.719.484.2419 FAX > 1.408.623.5963 Cell > http://fedex.com/us > > > > > > When using the system function I get an error. Does anyone know how to > > achieve that in perl. > > > > thanks in advance, > > Thomas > > >