Trouble with $key to HASH when Numeric

From: CowBoyCraig (simpsonc_at_us.ibm.com)
Date: 03/04/05


Date: 3 Mar 2005 20:26:34 -0800


It seems if I "Change" the $key going to if ""(exists($GREEN{$key}))""
at all It hoses. The keys look like "19973|3.1.A.4" without the quotes.

If I print like this "print GREEN{$key}\n"; to see what the Hash is
getting it looks like this:
}REEN{12483|3.1.B.2

That is odd? Is there a way to send my data to the hash without it
getting hosed???

Code below:

foreach (keys %HOT) {

           # 6AE-23945: 4.1.B.6 # Fix this
           # Make a Key for %GREEN from %HOT that works
           my $i=$_;
           $i=~/(\d{5}?)$/g;
           $i=$1;

              my $key="$i|$HOT{$_}";
              #print "$GREEN{$key}\n";

        if (exists($GREEN{$key})) {
            # Remove from %GREEN
            # remove $KEY and its value from %HASH
            print "Removed $GREEN{$key}\n";
            delete($GREEN{$key});
         } else { # print "did not see\n";
         }
  }

Craig



Relevant Pages

  • Re: Swap/Remap Ctrl and Alt keys.......Finally
    ... Both Alt keys and Ctrl keys are swapped, so I can use the keys next to ... startup/login script. ... I don't know if Ubuntu is watching your home folder for new files, ... And why is there a -n inside the back quotes? ...
    (Ubuntu)
  • Re: Poor Typography in Politics
    ... character codes and typography and you are faced with a keyboard with ' ... the keystrokes ` and ' printed as curly quotes. ... least two Windows keys into the "standard" keyboard. ... " and ' into language-and context-dependent quotation marks on input, ...
    (comp.fonts)
  • Re: Regex help
    ... you should loop through each short string array to count each string ... > array item's quotes number, the key point is to determine if the array's ... If it has odd number of quotes, mark it as start concatenate array ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Help with Update Query - VBA error
    ... "Expected end of statement" in this case means that there was an odd number ... of quotes used to build the SQL string rather than the expected pairs of ... He gave me the following VBA to use, but I when building I am getting the ... Private sub cmdEnterEssett_OnClick ...
    (microsoft.public.access.queries)
  • Re: csh is roots shell?
    ... > issues with diferent type of terminals. ... Hmm, been running into one odd thing, I copied and pasted the F keys ...
    (freebsd-current)