in reply to regex syntax and idomatic Perl
$capacity = $df_output =~ m[(\d+)%\s+/home$] ? $1 : 'Match Error'; [download]
see perlop for precedence problem you had.