$ENV{PATH} = "/bin:/usr/bin:/some/weird/bin"; $ENV{SOME_VAR} = "some value"; $output = `some_command that I want output for`; system("some_command with output to STDOUT");