in reply to Re: Dereferencing Mystery
in thread Dereferencing Mystery

Flat file isn't correct! The file is actually a listing of mostly hashes with default values to be used by a menu. The user of the menu makes some changes in the selections and it's these changes I want to save to disk for another process to read.

%Program fetch for example

%Program_fetch = ( "/airreba/procs" => "Y", "/reba/bin" => "Y", "/reba/onetime" => "Y", "/reba/perlib" => "Y", "/reba/shlib" => "Y", "/xcape/bin" => "Y", "/xcape/bin_util" => "Y", "/airreba/tables" => "Y", );

Edit: g0n - code tags

Replies are listed 'Best First'.
Re^3: Dereferencing Mystery
by davidrw (Prior) on Jan 08, 2006 at 01:14 UTC
    general comment: If the only choices are on & off ("Y" & something else), use "boolean" values instead -- it will make things a lot easier and cleaner cause you'll avoid code like if($foo eq 'Y') (or worry about case).. use 1 (or another non-zero number) for true and 0/undef for false. Then you can just do if($foo). (Depending on the usage you could just do if(exists $someHash{someKey}) as well ..). A good reference is True or False? A Quick Reference Guide