Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: An odd flat file database question

by Stamp_Guy (Monk)
on Feb 08, 2001 at 06:46 UTC ( [id://57116]=note: print w/replies, xml ) Need Help??


in reply to Re: An odd flat file database question
in thread An odd flat file database question

Hey Merlyn, My code accepts two arguements: First and Last. It just goes through the database and when it finds the first, it starts a loop that prints and increments a counter until it reaches the last number. It then prints the footer and exits. Really simple, really bulky, really sloppy, and a pain in the rear end to update. Also, I'm reading in the entire file into an array each time I do this. The file is about 250k. Do you think that it is pushing it to do that? Is there any quicker, perhaps more memory efficient way to do it? I'd give you the code, but I really don't think it will do any good after explaining what I did above. Let me know.
  • Comment on Re: Re: An odd flat file database question

Replies are listed 'Best First'.
Re: Re: Re: An odd flat file database question
by arturo (Vicar) on Feb 08, 2001 at 19:23 UTC

    There are a couple, but they all involve changing the format in which your data is stored. As others in this thread have mentioned, you can use DB_File and its ilk, or (my recommendation) an RDBMS like MySQL or Postgres (both available for the cost of a download, with plenty of online help). Perl's DBI interface is robust and mature, so you shouldn't have too much trouble making the transition. It can't hurt to know some SQL =)

    Philosophy can be made out of anything. Or less -- Jerry A. Fodor

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-09-20 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (26 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.