Hossein has asked for the wisdom of the Perl Monks concerning the following question:
I have a set of objects in an array. @obj_fw
When I search for an object, I run through the list @obj_fw, and check if f.ex. $obj_fw[$index]->name eq search-string.
I wonder if there's a better way of doing it? Like a nice method in the package. In this case MY::FW (FW.pm)
Thank you :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: OO search in objects
by Happy-the-monk (Canon) on Aug 14, 2013 at 12:09 UTC | |
|
Re: OO search in objects
by NetWallah (Canon) on Aug 14, 2013 at 14:17 UTC | |
by choroba (Cardinal) on Aug 14, 2013 at 14:19 UTC | |
by Jenda (Abbot) on Aug 14, 2013 at 15:22 UTC | |
by NetWallah (Canon) on Aug 14, 2013 at 17:49 UTC | |
by Jenda (Abbot) on Aug 14, 2013 at 21:19 UTC | |
by NetWallah (Canon) on Aug 14, 2013 at 17:47 UTC | |
by Anonymous Monk on Aug 14, 2013 at 15:02 UTC | |
by tobyink (Canon) on Aug 15, 2013 at 08:43 UTC | |
|
Re: OO search in objects
by locked_user sundialsvc4 (Abbot) on Aug 14, 2013 at 13:06 UTC |