How do I capture console output by using perl?

We are running some commands in console. My intention is to capture and save that output by using a Perl script.