Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: searching complex data structures

by Theseus (Pilgrim)
on Nov 29, 2002 at 21:12 UTC ( [id://216592]=note: print w/replies, xml ) Need Help??


in reply to searching complex data structures

Well, one thing that would be helpful to know is, after you search this complex data structure for the specific string, do you just need to know if it is present SOMEWHERE, or do you then need a reference to where in the structure it's stored?

If you just need to know if it occurs somewhere, you could use Data::Dumper to stringify your data structure and then search to see if your search string is present within the stringified data structure. However, if you need to know where in the structure the data is, this solution is less than perfect. Additionally, this could be a big performance hog if your data structure is very large.

Just an idea, it might work.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-29 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found