#!/usr/bin/perl -w use strict #### #!/usr/bin/perl -w use strict; my $prog = "C:\\path\to\\RNAfold"; my $infile = "C:\\path\\to\\infile"; my $outfile= "C:\\path\\to\\outfile"; my @args = qw/ -p noOUTPUTFILE /; print "Executing with one arg system\n"; my $return_value = system("$prog $infile $outfile"); if ($return_value == 0) { print "Success!\n"; } else { printf "Failed with error code %d\nError message: $?\n", $return_value>>8; } print "Executing with muti arg system\n"; $return_value = system($prog, $infile, $outfile); # or $return_value = system($prog, @args); # check how it went by checking return_value as above print "Executing $prog $infile $outfile with backtics\n"; my $screenoutput = `$prog $infile $outfile`; print "Got $screenoutput\n"; # check how it went by checking $? die "Got error $?\n" if $?