Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: do 45-47 to array 45,46,47

by hdb (Prior)
on Jul 01, 2013 at 12:57 UTC ( #1041848=note: print w/ replies, xml ) Need Help??


in reply to do 45-47 to array 45,46,47

Or with eval:

use strict; use warnings; my $_ = "45-48, 88-99, 102-124"; my @result = map { s/-/../; eval $_ } /(\d+-\d+)/g; print "@result\n";


Comment on Re: do 45-47 to array 45,46,47
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1041848]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2015-07-06 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls