use strict; use warnings; use Test::More tests => 2; use Test::Cmd; my $cmd = Test::Cmd->new( prog => '/bin/ls /etc/motd' ); is $cmd->run, 0, 'ls ran okay'; is $cmd->stdout, "/etc/motd\n", 'and gave expected output';