perl -wE '$_ = "7-12"; say join " ", [/(\d+)-/]->[0]..[/-(\d+)/]->[0]'
:-)
Update: slightly less ugly?
perl -wE '$_ = "7-12"; say join " ", (/(\d+)-/)[0]..(/-(\d+)/)[0]'
In reply to Re: numeric manipulation
by FunkyMonk
in thread numeric manipulation
by gerry622
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |