use warnings; use strict; use autodie; open OUT, '> df.out'; my $rc = `df -h`; print OUT "$rc\n";