Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: regex to an array , is there a better way to do this

by ikegami (Patriarch)
on Jul 08, 2009 at 17:11 UTC ( [id://778350]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @array =
        map { /^(\d+)\.\.(\d+)$/ ? $1..$2 : $_ }
        split /,/,
        $seq;
    
  2. or download this
    my %seen;
    my @array =
    ...
        map { /^(\d+)\.\.(\d+)$/ ? $1..$2 : $_ }
        split /,/,
        $seq;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2024-03-28 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found