develooper Front page | perl.beginners | Postings from February 2009

calling a program from a perl script and redirecting to output to a file

Thread Next
From:
Thomas Evangelidis
Date:
February 19, 2009 07:26
Subject:
calling a program from a perl script and redirecting to output to a file
Message ID:
833e1faf0902190726g733674bt5ca921fcc1d792fc@mail.gmail.com
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

When using the system function I get an error. Does anyone know how to
achieve that in perl.

thanks in advance,
Thomas

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About