Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Question on s///eg

by PrakashK (Pilgrim)
on Feb 27, 2002 at 17:27 UTC ( [id://147981]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @channels = (1, 1, 0, 1, 1, 1, 0);
    my $str = join "", @channels;
    my @range;
    push @range, join "-", ($-[0], $+[0]-1) while $str =~ m/(1+)/g;
    print join ",", @range;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found