Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
BTW, some of you folks might find this useful... we've got a site up
www.sprocketsandcogs.com
that has a perldoc, javascript, etc. search engine. Not sure how up to
date all of 'em are but they're occasionally pretty useful.
You can ignore the sign up crud at the bottom :)
-Tymm
On Thu, 7 Oct 1999, Routier, Daniel J. wrote:
> well except:
>
> $blah = (1,2,3,4);
> $bleh = 7;
> if (grep(EMAIL:PROTECTED)) {
> print "yay!\n"
> }
>
> it prints yay =)
>
> -----Original Message-----
> From: Scott K. Laws [mailto:EMAIL:PROTECTED]
> Sent: Thursday, October 07, 1999 11:30 AM
> To: EMAIL:PROTECTED
> Subject: Re: [UUG/MLUG] perl question fo the day
>
>
> EMAIL:PROTECTED:~
> $ perl -e ' @blah = (1,2,3,4);
> $bleh = 3;
> if (grep(EMAIL:PROTECTED)) {
> print "yay\n";
> }
> '
> map works too
> Scott
>
> On Thu, 7 Oct 1999, Routier, Daniel J. wrote:
>
> > Suppose I have
> >
> > @blah = (1,2,3,4);
> > $bleh = 3;
> >
> > And i want to find out if $bleh is a member of @blah.
> > as in part of a conditional statement,
> >
> > if ($bleh is in @blah) {
> > etc
> > }
> >
> > How would you do that conditional? I am finding no reference to it in the
> > manual so far :(
> > I'm assuming there is a way rather than looping through @blah searching
> for
> > $bleh.
> >
> > Daniel J Routier
> > Programmer / Analyst
> > Student Financial Aid
> > University of Missouri
> >
>