in reply to Re: lexical scope in if/elsif tests
in thread lexical scope in if/elsif tests

Much appreciated. I would vote you up if I could. I can't use your code because the example I posted was contrived. The real code I'm using has keys and values flipped based on which hash I'm putting them in. I'm doing it that way because it makes the config file more readable and the flow of the script more logical.

Replies are listed 'Best First'.
Re^3: lexical scope in if/elsif tests
by NetWallah (Canon) on Apr 05, 2010 at 22:27 UTC
    It is easy enough to generate a "correctly" (in terms of ease-of-programming) directed hash from "flipped" values from a config file:
    Untested pseudo-code:
    my %correct; while (<config-file>){ ::Read data in the form $dest_hash_name, $text, [other info...] $correct{$text} = Generate_hashref($dest_hash_name); }

         Syntactic sugar causes cancer of the semicolon.        --Alan Perlis