I want a mental model for how to sec identifies variables in a config file.
Here for example, I want to save some typing in my rules by creating a variable
containing a string. In this example, I spend a lot of time (in the rules)
writing to a particular file, so I want to type “action=write $tocpipe
whatever” rather than “action=write /home/tocops/.tocpipe whatever”
# Global variables for config file
type=Single
ptype=SubStr
pattern=SEC_STARTUP
context=SEC_INTERNAL_EVENT
desc=initialize location of tocpipe
action=assign $tocpipe /home/tocops/.tocpipe
action=assign %tocpipe /home/tocops/.tocpipe
Thinking in Perl, I would call this variable ‘$tocpipe’. But sec doesn’t like
me to doing that; instead, it seems happier if I name the variable ‘%tocpipe’,
i.e. with a leading percent sign rather than a leading dollar sign.
Am I correctly understanding here that while Perl may want to see a ‘$’ in
front of simple variables, sec (in its config files) wants to see a ‘%’?
I keep wanting to think about ‘%tocpipe’ as a Perl does … as a hash … and I’m
beginning to believe that I’m mistaken in this thinking.
Would you agree with this statement?
* Inside config files, sec uses the sigil ‘%’ to indicate a variable. This
is a simple variable, not a Perl hash.
--sk
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users