On Tue, 18 Sep 2001, Teresa Raymond wrote:
> Just wondering about the exclamation mark here:
>
> > > @UNLOCKED = grep(!/LOCKED/g, @SAME);
>
> Would this be equivalent to using !~/LOCKED/g ?
The ! is negating the regular expression's boolean value -- if the regular
expression matches, it returns true, but the ! negates that to a false, so
grep doesn't return the array element pulled from @SAME, and @UNLOCKED
will only contains strings that don't contain 'LOCKED'.
-- Brett
http://www.chapelperilous.net/
------------------------------------------------------------------------
In Hollywood, all marriages are happy. It's trying to live together
afterwards that causes the problems.
-- Shelley Winters
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]