in reply to Re: eliding number ranges
in thread eliding number ranges

Same principle as japhy, same mistake:
$ echo "2 21" | perl -nle 's/(\d*)(\d*)\s+\1(\d*)/$1$2-$3/; s/-$// +; print' 2-1

Abigail

Replies are listed 'Best First'.
Re: Re: eliding number ranges
by pizza_milkshake (Monk) on Nov 13, 2003 at 16:33 UTC
    aw christ, that still won't work on 2-20. i suck. apologies to everyone. delete my posts if possible.

    perl -e"map print(chr(hex(( q{6f634070617a6d692e7273650a}=~/../g)[hex]))), (q{375542349abb99098106c}=~/./g)"