<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl processing issue Interesting name characters. in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940225#M102734</link>
    <description>foreach my $l1 ('A' .. 'Z', 'a' .. 'z') {&lt;BR /&gt;foreach my $l2 (map { chr } 32 .. 127) {&lt;BR /&gt;my $L = "$l1$l2";&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;JRF was a faster typer.&lt;BR /&gt;&lt;BR /&gt;1. I think you should *ALWAYS* program/script strict-safe: use lexicals, use strict, use -w or warnings&lt;BR /&gt;2. The range bounds should be quoted&lt;BR /&gt;3. The range should be explicit: 'A'..'z' IS NOT the same as 'A'..'Z','a'..'z'&lt;BR /&gt;4. The inner foreach ranges from space (character 32 or 0x20) to DEL (character 127 or 0x7F)&lt;BR /&gt;&lt;BR /&gt;$l1.$l2 is exaclty the same as $l1.$l2&lt;BR /&gt;&lt;BR /&gt;As a side note, what do you do with diacriticals?&lt;BR /&gt;&lt;BR /&gt;Ã  (A-acute), Ã  (A-ring), Å  (l-stroke), Ã« (e-diaeresis), etc, etc&lt;BR /&gt;&lt;BR /&gt;They usually fall outside of ASCII, so you will need to know how your LDAP source stores it in order to get it. Unicode (UTF-8, UTF-16, ...), iso-8859-??, iso-10646-1, ...&lt;BR /&gt;FWIW Names *starting* with a character outside of the range 'A'..'Z','a'..'z' also drop out of my stats, because HP does not have them in the index pages :)&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
    <pubDate>Sun, 13 Nov 2005 13:45:31 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2005-11-13T13:45:31Z</dc:date>
    <item>
      <title>Perl processing issue Interesting name characters.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940219#M102728</link>
      <description>Got a little perl snippet.&lt;BR /&gt;------begin code snippet-----&lt;BR /&gt;foreach $L1 (A..z) {&lt;BR /&gt;        foreach $L2 (A..z) {&lt;BR /&gt;                $L = $L1.$L2 ;&lt;BR /&gt;&lt;BR /&gt;-----end code snippet---------&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;# $L is the first two characters of someones name.&lt;BR /&gt;What happens after this is a ldapsearch for a list of names.  Basically an ldap search requeset is built based on the first two letters of the last name.&lt;BR /&gt;&lt;BR /&gt;Question at hand is what happens if someone's name has a non-standard character in it what happens?&lt;BR /&gt;&lt;BR /&gt;Lets say the users last name is:&lt;BR /&gt;D'gostino?&lt;BR /&gt;&lt;BR /&gt;I'm betting I know the answer to this one, which is that D'gostino up there never gets processed.&lt;BR /&gt;&lt;BR /&gt;Bunny for confirmation of this. &lt;BR /&gt;&lt;BR /&gt;If there is a quick modification of the first two lines of code that will include those with aprostrophe's in the name please re-write and post.&lt;BR /&gt;&lt;BR /&gt;Bunny for this after I test the code and nothing else breaks.&lt;BR /&gt;&lt;BR /&gt;This seems like a job for procura or A. Clay.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 13 Nov 2005 10:42:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940219#M102728</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-11-13T10:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Perl processing issue Interesting name characters.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940220#M102729</link>
      <description>Hi Steven:&lt;BR /&gt;&lt;BR /&gt;Of course, the loop shown will never produce $L with a "non-standard" character such as an apostrophe.  You could amend the isolated snippet to something covering a larger set like this:&lt;BR /&gt;&lt;BR /&gt;foreach $L1 (A..Z) {&lt;BR /&gt;    foreach $L2 (a..z, qw(')) {&lt;BR /&gt;        $L = $L1.$L2 ;&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;This generates combinations that begin with an uppercase letter (only) and follow that with an uppercase, a lowercase, or an apostrophe, covering names like: "DeBusk", "D'gostino", "Protter", etc.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...  &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 13 Nov 2005 11:58:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940220#M102729</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-11-13T11:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Perl processing issue Interesting name characters.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940221#M102730</link>
      <description>Correction: Or JRF.&lt;BR /&gt;&lt;BR /&gt;Looks like you got both bunnies with one post.&lt;BR /&gt;&lt;BR /&gt;I'll test it in the morning(Israel time).&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;&lt;BR /&gt;Bunnie@JRF&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Sun, 13 Nov 2005 12:01:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940221#M102730</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-11-13T12:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Perl processing issue Interesting name characters.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940222#M102731</link>
      <description>syntax error under use strict:&lt;BR /&gt;&lt;BR /&gt;Global symbol "$L1" requires explicit package name at xx.pl line 6.&lt;BR /&gt;Global symbol "$L2" requires explicit package name at xx.pl line 7.&lt;BR /&gt;Global symbol "$L" requires explicit package name at xx.pl line 8.&lt;BR /&gt;Global symbol "$L1" requires explicit package name at xx.pl line 8.&lt;BR /&gt;Global symbol "$L2" requires explicit package name at xx.pl line 8.&lt;BR /&gt;Bareword "A" not allowed while "strict subs" in use at xx.pl line 6.&lt;BR /&gt;Bareword "z" not allowed while "strict subs" in use at xx.pl line 6.&lt;BR /&gt;Bareword "A" not allowed while "strict subs" in use at xx.pl line 7.&lt;BR /&gt;Bareword "z" not allowed while "strict subs" in use at xx.pl line 7.&lt;BR /&gt;Execution of xx.pl aborted due to compilation errors.&lt;BR /&gt;&lt;BR /&gt;No lexicals, barewords and ranges that include characters that are not supposed to be included ('A' .. 'z' includes '[', '\', ']', '^', '_', and '`'), and it's not portable to EBCDIC&lt;BR /&gt;&lt;BR /&gt;Now let's start with rewriting it to proper Perl:&lt;BR /&gt;--8&amp;lt;---&lt;BR /&gt;#!pro/bin/perl&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;&lt;BR /&gt;foreach my $L1 ('A' .. 'z') {&lt;BR /&gt;    foreach my $L2 ('A' .. 'z') {&lt;BR /&gt; my $L = $L1.$L2;&lt;BR /&gt; }&lt;BR /&gt;    }&lt;BR /&gt;--&amp;gt;8---&lt;BR /&gt;&lt;BR /&gt;Code rewrite:&lt;BR /&gt;&lt;BR /&gt;foreach my $l1 ('A' .. 'Z', 'a' .. 'z')Â&amp;nbsp;{&lt;BR /&gt;foreach my $l2 (map { chr } 32 .. 127) {&lt;BR /&gt;my $L = "$l1$l2";&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;I do not have enough LDAP knowledge to verify the LDAP questions.&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Sun, 13 Nov 2005 12:06:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940222#M102731</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-11-13T12:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Perl processing issue Interesting name characters.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940223#M102732</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;foreach $L1 (A..z) {&lt;BR /&gt;foreach $L2 (32..126) {&lt;BR /&gt;$L = $L1.chr($L2) ;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Regards LiPEnS</description>
      <pubDate>Sun, 13 Nov 2005 12:10:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940223#M102732</guid>
      <dc:creator>LiPEnS</dc:creator>
      <dc:date>2005-11-13T12:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Perl processing issue Interesting name characters.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940224#M102733</link>
      <description>Not really and ldap question. Its an ancillary piece of information for the curious.&lt;BR /&gt;&lt;BR /&gt;Merijn, I don't quite understand your post and it looks partially distorted by itrc.&lt;BR /&gt;&lt;BR /&gt;I guess another good question is besides apostrophe's are there any other strange characters I have to look for?&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Sun, 13 Nov 2005 12:22:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940224#M102733</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-11-13T12:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Perl processing issue Interesting name characters.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940225#M102734</link>
      <description>foreach my $l1 ('A' .. 'Z', 'a' .. 'z') {&lt;BR /&gt;foreach my $l2 (map { chr } 32 .. 127) {&lt;BR /&gt;my $L = "$l1$l2";&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;JRF was a faster typer.&lt;BR /&gt;&lt;BR /&gt;1. I think you should *ALWAYS* program/script strict-safe: use lexicals, use strict, use -w or warnings&lt;BR /&gt;2. The range bounds should be quoted&lt;BR /&gt;3. The range should be explicit: 'A'..'z' IS NOT the same as 'A'..'Z','a'..'z'&lt;BR /&gt;4. The inner foreach ranges from space (character 32 or 0x20) to DEL (character 127 or 0x7F)&lt;BR /&gt;&lt;BR /&gt;$l1.$l2 is exaclty the same as $l1.$l2&lt;BR /&gt;&lt;BR /&gt;As a side note, what do you do with diacriticals?&lt;BR /&gt;&lt;BR /&gt;Ã  (A-acute), Ã  (A-ring), Å  (l-stroke), Ã« (e-diaeresis), etc, etc&lt;BR /&gt;&lt;BR /&gt;They usually fall outside of ASCII, so you will need to know how your LDAP source stores it in order to get it. Unicode (UTF-8, UTF-16, ...), iso-8859-??, iso-10646-1, ...&lt;BR /&gt;FWIW Names *starting* with a character outside of the range 'A'..'Z','a'..'z' also drop out of my stats, because HP does not have them in the index pages :)&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Sun, 13 Nov 2005 13:45:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940225#M102734</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-11-13T13:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Perl processing issue Interesting name characters.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940226#M102735</link>
      <description>Hi Steven &amp;amp; Merijn:&lt;BR /&gt;&lt;BR /&gt;Merijn wrote that "JRF was a faster typer" and perhaps that's true, *BUT* Merijn's pointers really complete the lesson, as they always do.&lt;BR /&gt;&lt;BR /&gt;*ALWAYS* using the 'strict' and 'warnings' pragmas saves everyone in the long run.  Haste makes waste and discipline in code developement gives not only the code, but the maintainer too, a long career. :-))&lt;BR /&gt;&lt;BR /&gt;Regards to you both!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 13 Nov 2005 14:04:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940226#M102735</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-11-13T14:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Perl processing issue Interesting name characters.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940227#M102736</link>
      <description>Now I can hand out double bunnies to both.&lt;BR /&gt;&lt;BR /&gt;Kewl.&lt;BR /&gt;&lt;BR /&gt;ITRC. There is no better place.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Sun, 13 Nov 2005 14:27:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940227#M102736</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-11-13T14:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Perl processing issue Interesting name characters.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940228#M102737</link>
      <description>I'm closing for now. I've used JRF's code from his first post.&lt;BR /&gt;&lt;BR /&gt;Even though he acknowledges it could be improved upon, its a production problem and the simple solution makes the production problem go away.&lt;BR /&gt;&lt;BR /&gt;I will try and build a better solution that takes into account future strangeness in last name definition.&lt;BR /&gt;&lt;BR /&gt;Aside,&lt;BR /&gt;&lt;BR /&gt;JRF, A pleasure to work with you. Your Perl skills obviously exceed mine, but you gave me the confidence to test a solution and confirmed my problem definition.&lt;BR /&gt;&lt;BR /&gt;I know life changes and people do to, but It is a pleasure to have you back and I learn from every post you make that I read.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 14 Nov 2005 03:01:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-processing-issue-interesting-name-characters/m-p/4940228#M102737</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-11-14T03:01:55Z</dc:date>
    </item>
  </channel>
</rss>

