What you need, but : never use qx . It is ancient and dangerous; everything that you feed him passes through the shell, so it is very easy to be vulnerable to shell injections or wonder if /bin/sh not quite what you expected.
Use the multi-arg open() form, which completely bypasses the shell.
open my $fh, '-|', 'df', "-$opt", '/tmp' or die "Can't open pipe: $!"; my @lines = <$fh>;
Eevee source share