Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: extract range from array of data

by BrowserUk (Patriarch)
on Dec 26, 2015 at 12:04 UTC ( [id://1151190]=note: print w/replies, xml ) Need Help??


in reply to extract range from array of data

Use the flip-flop operator:

@d = grep{ /^start$/ .. /^end$/ } <hFile>;

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: extract range from array of data
by QuillMeantTen (Friar) on Dec 26, 2015 at 12:45 UTC

    BrowserUK you just blew my mind, thanks for the tip!

Re^2: extract range from array of data
by theleftright (Novice) on Dec 26, 2015 at 13:06 UTC
    thanks (y) perfect.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-24 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found