in reply to regex syntax and idomatic Perl

$capacity = $df_output =~ m[(\d+)%\s+/home$] ? $1 : 'Match Error';

see perlop for precedence problem you had.