in reply to Reading from STDOUT after Redirecting it.

The second-easiest way to do what you want (after backticks) is to just have the shell do the work:
system("$cmd $ip >$file") and warn "Can not execute $cmd: $!\n";