DeadStar
DeadStar

Reputation: 109

PERL: How to redirect STDOUT of a script inside a wrapper

I want to make a perl script which gonna be a wrapper to another script. Inside my wrapper, I run the "other script" with some parameters. This "other script" should print quite a lot of runtime data to the STDOUT. So, how do I let the "some script" print the data to STDOUT immediately when I run it inside my perl wrapper? (I don't want any files/variables only the STDOUT)

Thank you for your answers in advance!

Upvotes: 1

Views: 94

Answers (1)

John C
John C

Reputation: 4396

If you call your command with system() then the stdout will go to stdout.

eg:

perl -e "system('ls');"

Upvotes: 1

Related Questions