Catch stdout from eval possible

P

Petterson Mikael

Hi,

When I execute the jar command with eval I want to catch STDOUT.
Is it possible? How?

This is the line I am trying to execute.
********
eval{`jar -cvf ${data_type}.jar -C $root_dir\/${data_type}`};
********

//Mikael
 
X

xhoster

Hi,

When I execute the jar command with eval I want to catch STDOUT.

You are not executing the jar command with eval. You are executing
it with backticks.
Is it possible? How?

This is the line I am trying to execute.
********
eval{`jar -cvf ${data_type}.jar -C $root_dir\/${data_type}`};

my $stdout = `jar -cvf ${data_type}.jar -C $root_dir\/${data_type}`;

I don't know why the eval is necessary, or why you think it is necessary.
So I did away with it.

Xho
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top