Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Foo;
- use strict;
- use warnings;
- use utf8;
- our %FORM = (placeString => "Región");
- package main;
- use feature qw(say);
- use strict;
- use warnings;
- use utf8;
- binmode STDOUT, ':encoding(utf-8)';
- binmode STDERR, ':encoding(utf-8)';
- my $placeString = $Foo::FORM{'placeString'};
- say STDOUT $placeString;
- printf "1: %vX\n", $placeString;
- my $placeString2 = "Región";
- printf "2: %vX\n", $placeString2;
- if ($placeString =~ /^([\w\s,.'-]+)$/) {
- say STDERR "Accepted placename (1).";
- }
- if ($placeString2 =~ /^([\w\s,.'-]+)$/) {
- say STDERR "Accepted placename (2).";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement