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

Re: An odd flat file database question

by ftforger (Sexton)
on Feb 09, 2001 at 00:38 UTC ( [id://57257]=note: print w/replies, xml ) Need Help??


in reply to An odd flat file database question

While your db may have other problems (which others have made suggestions about) I'll answer with one method of doing what you are asking for. Load your file into @array. Then start from the top of the array looking for a match on your first key. The first match is the starting index for your output. Next, use a reverse for loop, ie start at the last line of the array and decrement by one, until you get a match. That is the last line you want to output. Then simply print out everything from your first index to your second index. A quick fix that will hold off the dogs while you are learning to program a real dbi.

Log In?
Username:
Password:

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

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

    No recent polls found