I personally think holding onto $min and $max reads easier, but I can understand the desire for conciseness.$range =~ /^(\d+)(?:-(\d+))?$/; $total_min += $1; $total_min += $2//$1;
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: Is there a more functional regex syntax?
by kennethk
in thread Is there a more functional regex syntax?
by smls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |