#!c:/perl/bin/perl use strict; open (HYPERS, "< hypers.txt"); my @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