> -----Original Message-----
> From: Thomas Evangelidis [mailto:[email protected]]
> Sent: Thursday, February 19, 2009 08:27
> To: [email protected]
> 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
>
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/