On Wed, Mar 4, 2009 at 4:21 PM, Berler Chanan wrote:
> 2) Using hash is great but I looked for more suite and elegant solution

You could simply wrap the hash solution in an appropriately names sub,
giving you the elegant solution for example:

{{{
if ( is_in_array(item => 'George' , aref => \...@beatles) )
}}}

You could even put "sub is_in_array" in a separate .pm file and "use"
it so that the user need never be exposed to the "ugly" code which
implements the pretty and elegant interface :)

Cheers,
-- 
Offer Kaye
_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl

Reply via email to