my $targ_vol = "/"; my @df_output = `df -k $targ_vol`; # output should be two lines: # first line is column headings, second line is data my %df_data; if ( @df_output ) { my @headings = split( /\s+/, $df_output[0] ); my @data = split( /\s+/, $df_output[1] ); @df_data{@headings} = @data; } print "available on $targ_vol: $df_data{Avail}\n"; # (your version of df might use some string similar to but different from "Avail")