Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Limiting array size?

by lhoward (Vicar)
on Jul 05, 2001 at 23:45 UTC ( #94231=note: print w/replies, xml ) Need Help??


in reply to Limiting array size?

You could do it transparently by using ties (once you implemented the tie). Depending on how you want to limit it your STORE sub would check the current array size and act apropriately if it would cause an overflow (reject the insert, throw out some data already in the array, die, etc...). If you're wanting to do this to implement a limited size cache there are already modules out there to do that (Tie::Cache, Tie::Cache::LRU, etc..).

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2019-08-21 15:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?