Re: Rookie Perl Question



swangdb <swangdb@xxxxxxxxxx> wrote:

I want to run some unix commands from a perl script.

$temp = "egrep -v \^# $ALIASES";
system($temp);


Have you read the documentation for the function that you are using?


This doesn't work, it tries to take the egrep output

system($temp);


Have you read the documentation for the function that you are using?


How can I make this work?


The way it says to in the documentation for the function that you are using.

perldoc -f system

This is *not* what you want to use to capture the output from a
command, for that you should use merely ...


--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.



Relevant Pages