On Tue, Jun 21, 2011 at 10:01:17AM -0400, Bob McConnell wrote:
> From: Paul Johnson
> 
> > On Tue, Jun 21, 2011 at 05:57:22AM -0700, Beware wrote:
> > 
> > > Hi to all,
> >> 
> >> First of all, sorry for the late of my answer.
> >> Thank for all your sentence.
> >> 
> >> Here's my solution (for now) :
> >> 
> >> for my $w (@keywords)
> >>       {
> >>          if ( /\b$w\b/ and !/\buc($w)\b/ )
> >>          {
> >>             print "Keyword '$w' not uppercase line $.\n";
> >>             ajoute_erreur( 7, $. );
> >>             last;
> >>          }
> >>       }
> >> 
> >> It's probably less fast than other ones, but it seems to work.
> > 
> > I'm afraid you may need to improve your testing skills.
> > 
> > I assume your keywords are in lower case.  What happens with mixed case?  
> > You
> > would need /i on your first //
> 
> You need to be a little more careful about those assumptions. He is looking 
> for all keywords that are not in UPPERCASE.

Sorry, I wasn't clear.  What I should have said was something like: I assume
that the elements of the array @keywords are all in lower case.

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to