Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: File::Grep: Add'l Functionality.

by dmitri (Priest)
on Jan 21, 2002 at 22:42 UTC ( #140457=note: print w/replies, xml ) Need Help??

in reply to File::Grep

It would be nice if this module provided options to match across multiple lines (so that it is a little more Perlish).

Replies are listed 'Best First'.
Re: Re: File::Grep: Add'l Functionality.
by Masem (Monsignor) on Jan 22, 2002 at 02:55 UTC
    Right now, I don't slurp the entire file, as to be efficient on memory. I can imagine a version where, at any one time, N lines from the file are in memory, thus allowing multiline regexes. The problem here is what to return in the case where you want the matched data. Do you return the N matched lines that triggered it? Or (and something to add to this version) just the line number where the match started? I think the best way to handle this would be to write an extention for the module, File::Grep::Multiline, that I can add later after getting the main part up to CPAN.

    Dr. Michael K. Neylon - || "You've left the lens cap of your mind on again, Pinky" - The Brain
    "I can see my house from here!"
    It's not what you know, but knowing how to find it if you don't know that's important

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2018-08-16 09:53 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (167 votes). Check out past polls.