$capacity = $df_output =~ m[(\d+)%\s+/home$] ? $1 : 'Match Error';
see perlop for precedence problem you had.
In reply to Re: regex syntax and idomatic Perl
by tybalt89
in thread regex syntax and idomatic Perl
by cbeckley
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |