> map returns the result of the last evaluated statement...
> @must would have ones and zeros... I want the $1 portion but 
> only if it ends in '/*' there really isn't a speed issue... 
> it's more a "can i make this line look sweeter?"
> 
> > > is there a way to write this without using map AND grep AND
> > > without making
> > > it longer than it is?
> > > @must = map { m/(.*)\/\*/; $1 } grep m/\/\*/, @recomp;
> > > 
> > > where  @recomp = qw( stuff/stuff.c
> > >           crap/*
> > >           morestuff/*
> > >           stuffy/stuff_stuff.c
> > >           stuffy/suffering.c
> > >           ); # and more of the similar
> > 
> > Hmm. Have you tried:
> > 
> > @must = map { /^(.*)\/\*$/ } @recomp;

Those two lines were working exactly the same way when I tested them...
I'm on a Win2000 Pro box with ActivePerl 5.6.1

Are they not working the same way on your system?

 -dave



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to