On Mon, Oct 05, 2009 at 08:04:37PM +0100, John wrote:
>>
> I would realy like to be able to do is somthing like this.
>
> my $str = 'garçon';
> use local 'fr';
> print "Contains french exemplar characters" if $string=~/^\w+$/;
> use local 'en';
> print "Contains non english exemplar characters" unless $string=~/^\w+$/;
You can do it this way, not having to depend on whatever may be installed
on the system:
sub French {return <<"--"} # Might not be the correct set of French chars.
41 5A
61 7A
C0 C2
C6 CA
CC CE
D2 D4
E0 E2
E6 EA
EC EE
F2 F4
--
say "Contains French exemplar characters" if $string =~ /^\p{French}+$/;
Abigail
Thread Previous
|
Thread Next