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