in reply to Re: regex syntax and idomatic Perl
in thread regex syntax and idomatic Perl
Ah, ok. I see why
$capacity =($df_output =~ m[(\d+)%\s+/home$]) ? $1 : 'Match Error';
is correct.
Thank you for the link, otherwise my next question was going to why the previous version didn't produce an error. However, the fact that this operator can evaluate to an lvalue now prompts the next question, where else does this occur? Does any expression that evaluates to a object or variable work the same way?
Thanks,
cbeckley
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: regex syntax and idomatic Perl
by AnomalousMonk (Archbishop) on Mar 22, 2017 at 21:50 UTC | |
by haukex (Archbishop) on Mar 22, 2017 at 22:04 UTC | |
by cbeckley (Curate) on Mar 22, 2017 at 23:33 UTC | |
by haukex (Archbishop) on Mar 23, 2017 at 11:20 UTC | |
by cbeckley (Curate) on Mar 23, 2017 at 14:44 UTC | |
by AnomalousMonk (Archbishop) on Mar 23, 2017 at 01:43 UTC | |
by cbeckley (Curate) on Mar 23, 2017 at 02:05 UTC | |
by cbeckley (Curate) on Mar 23, 2017 at 02:26 UTC |