">" requires the use of a shell, and thus, isn't taint-safe. You could use system("/bin/sh", ...), but be very careful to validate the strings you pass as arguments to the shell. Alternatively, you could use fork+exec with IO handles manipulations (with or without the help of IPC::Open3 or IPC::Run).