in reply to Re: Extracting full digits from a range
in thread Extracting full digits from a range
Thanks for the help everyone. This one looks like it will fit best into my script, however I'm having one more issue, and it's no doubt something really ridiculous I'm doing wrong.
I have the following code snippet:
#!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;; } Output: Hypers array: 293F:2946
So I know the array is being read, but when trying to shove it into that regex it's coming out as '', almost like it's not there.
The HYPERS file looks like this:
293F:2946
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Extracting full digits from a range
by BrowserUk (Patriarch) on Aug 06, 2012 at 14:02 UTC | |
by smw6181 (Initiate) on Aug 06, 2012 at 14:23 UTC | |
|
Re^3: Extracting full digits from a range
by choroba (Cardinal) on Aug 06, 2012 at 13:43 UTC |