Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Extracting full digits from a range

by Kenosis (Priest)
on Aug 03, 2012 at 19:56 UTC ( #985339=note: print w/replies, xml ) Need Help??


in reply to Extracting full digits from a range

And another option:

use Modern::Perl; '293F:2945' =~ /(.+):(.+)/ and say join ',', map { sprintf '%X', $_ } eval "0x$1..0x$2";

Output

293F,2940,2941,2942,2943,2944,2945

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985339]
help
Chatterbox?
[marto]: good morning all
[Corion]: Hi marto!
[Corion]: I hope all is well marto! ;) My godson had a surprise visit to the hospital yesterday because he fell and had cut his skin besides his eye, but everything was glued together again and all is well
[marto]: good grief, that's not fun, glad to hear all is as well as could be :)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2016-12-08 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (137 votes). Check out past polls.