in reply to How to use system command in perl script?
sub run { my $cmd_out; $cmd_out = `gcc code.cpp`; $? and warn $cmd_out; print `a.out`; # Note that you had a slash in your call. $? and warn "a.out had error"; } [download]