in reply to Re^2: Extracting full digits from a range
in thread Extracting full digits from a range
it's no doubt something really ridiculous I'm doing wrong.
Dunno! Your code and your hypers file produce the apparently desired result on my machine:
C:\test>type junk12.pl #!c:/perl/bin/perl use strict; open (HYPERS, "< hypers.txt"); my @hypers = <HYPERS>; chomp @hypers; print "Hypers array: @hypers\n"; foreach my $line(@hypers){ $line =~ /([0-9a-f]+):([0-9a-f]+)$/i and my @range = map sprintf( '%x,',$_ ), eval "0x$1 .. 0x$2";; print @range;; } C:\test>type hypers.txt 293F:2946 C:\test>junk12 Hypers array: 293F:2946 293f,2940,2941,2942,2943,2944,2945,2946, C:\test>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Extracting full digits from a range
by smw6181 (Initiate) on Aug 06, 2012 at 14:23 UTC |