Rob Dixon wrote:
On 15/06/2011 12:10, Paul Johnson wrote:
#!/usr/bin/perl
use strict;
use warnings;
my @keywords = qw
(
abs access after alias all and architecture array assert attribute begin
block body buffer bus case component configuration constant disconnect
downto else elsif end entity exit file for function generate generic
group
guarded if impure in inertial inout is label library linkage literal loop
map mod nand new next nor not null of on open or others out package port
postponed procedure process pure range record register reject return rol
ror select severity signal shared sla sli sra srl subtype then to
transport type unaffected units until use variable wait when while with
xnor xor
);
my $kw = join "|", @keywords;
You would need
my $kw = join "|", map uc, @keywords;
Or:
my $kw = uc join '|', @keywords;
Why call uc() multiple times when you only need to call it once?
John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction. -- Albert Einstein
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/