in reply to Extracting full digits from a range

You have to
  1. get the start and end values,
    my($min, $max) = /\b([0-9a-f]+):([0-9a-f]+)\b/i;
  2. convert them to integers
    foreach($min, $max) { $_ = hex($_); }
  3. turn them into a range or span:
    my @list = $min .. $max;
  4. turn each into a hex number.
    my @hex = map { sprintf '%X', $_ } $min .. $max;
    will do.
  5. print out the list with ',' between them:
    $, = ','; print @list;
    update Oops, that should have been
    $, = ','; print @hex;

Replies are listed 'Best First'.
Re^2: Extracting full digits from a range
by cztmonk (Monk) on Aug 04, 2012 at 10:42 UTC

    Did you test? It outputs

    10559,10560,10561,10562,10563,10564,10565
      Yeah, I printed the wrong list.