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 02:40:26AM +0100, Simon Cozens wrote:
> 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})
umm.... I think this classifies as perl abuse.... thanks Simon I'm going to
have nightmares...
> 
> Don't ask. :)
> 
> -- 
> 	int three = 128+64, two = 128, one=64;
>     - plan9 has a bad day
> 
> -----------------------------------------------------------------------
> Next Technical Meeting:  Sat, May 12 13:30- 
> Next Nomikai Meeting:    Fri, June (TBA) 19:30- Tengu Tokyo Eki Mae
> -----------------------------------------------------------------------
> more info: http://www.tlug.gr.jp           Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links