Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Dereferencing Mystery

by Anonymous Monk
on Jan 08, 2006 at 01:02 UTC ( [id://521767]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://521767]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-20 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found