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

Re: [FWP] Gender differentiation



Bill Jones wrote:
> 
> Er, GONG!  Nope:
> 
> while (<DATA>) {
>    print $_ if /(?:[^o]|[^w]o|^.?)[Mm][ae]n/; # Still finding women...
> }

Correct this to 

while (<DATA>) {
   print "$1: $_" if /((?:[^o]|[^Ww]o|^.?)[Mm][ae]n)/;
}

to adjust for uppercase Women and it Does The Right Thing (TM).

__DATA__
'Snowmen' are leaving 'snowwomen' alone; too icey...
Some women walking.
Some men walking.
Woman is singular.
Man is singular.
The manadin orange was rotten.
There are men-working here.
Dancing women prove sexist, news at 11.
Men chase women for no apparent reason.
Women encourage them to do stupid things.
Abc Men In middle.
Men 123 at start.
Abc 123 at their end are men.
Abc Women in middle.
Here there be, women!

Roland
--
perl -e '@_=@ARGV;$_="@_[-3,-2,-1]";s{([@{[$_[-1]]}])}#($0=$1.
${[qw[>$%, ()%{&", &"=, |}+&" *]]}[$@++])=~y/*=->$%&"(-){-}+,/
lusternohack /,$0#eg; print; '        -- Roland Giersig, JAPH.

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe