Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Perl: how to do is x in @example.com



On Fri, May 25, 2001 at 01:21:54AM -0000, Jean-Christian Imbeault wrote:
> @example.com = {"one", "two"};
       ^ That's an anonymous hash constructor. You don't want one of them. :)

> if ($x is in @example.com) {do this;}

You could use one here, though:
    if (exists {map {$_=>1} @example.com }->{$x})

Don't ask. :)

-- 
	int three = 128+64, two = 128, one=64;
    - plan9 has a bad day


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links