Re : Re: Re : Re: Re : Re: Check if words are in uppercase?

2011-06-21 Thread Beware
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, $. );

Re : Re: Re : Re: Check if words are in uppercase?

2011-06-14 Thread Beware
Hi Sorry, i've been tired these past days. So, this is what i want to do : I've source code files in VHDL. I want to check that all specific keywords of this language are in uppercase. In fact, in my current script i read this file line per line and check others rules. Am i clear, now? --

Re : Re: Check if words are in uppercase?

2011-06-14 Thread Beware
Hi and thank you for your answer. But how can i use it with a list of word. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Check if words are in uppercase?

2011-06-14 Thread Beware
@John : Thank you for your advices. @Rob Dixon : Your script works fine, but i want to add a little more thing. In fact, i want to detect if a word is in line (of course) and if it's not in uppercase. I mean, for example, i want to detect : aLL aLl All etc.. but not ALL (which is correct for me).

Check if words are in uppercase?

2011-06-10 Thread Beware
Hi all, i've a question on my perl script. In my script i read a file line per line, and check if keywords are in uppercase. To do that, i've an array filled with all used keywords. On each line, i check all keywords with a foreach loop. Well, this is my code : my $lines = 0; while ( ) {