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

Re: An odd flat file database question

by Anonymous Monk
on Feb 08, 2001 at 19:21 UTC ( [id://57184]=note: print w/replies, xml ) Need Help??


in reply to An odd flat file database question

This is not a nice way of doing it, but would ensure that every correct catalog number is caught. The trick is to run a loop going through every line (yeah ... all 10,100) and comparing the number to the range wanted. The loop wouldn't exit at the first out of range catalog number. It's not very neat but it gets the job done.

Alternatively if the catalog is in order (ie: the file is ordered by ascending catalog numbers), you could exit the loop when the catalog number is equal to $last+1. Thereby catching all the references to $last.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-09-18 05:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (23 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.