sub execute_cmd { my $cmd = shift; my $cmd_return; print "Details: $cmd\n"; $cmd_return = `$cmd`; if ( $? == 0 or die "Error: $?" ) { return $cmd_return; } }