in reply to Is there a more functional regex syntax?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is there a more functional regex syntax?
by kennethk (Abbot) on Sep 18, 2012 at 16:56 UTC | |
by smls (Friar) on Sep 18, 2012 at 17:14 UTC | |
by kennethk (Abbot) on Sep 18, 2012 at 17:35 UTC |