> I think I figured it out. From the manual page, it looks like I can > set the $alnum variable inside the perl mini code, and then eval takes > on that value under %alnum. %alnum is usable in actions and $alnum > is available within patterns and context expressions. > > That is pretty neat and tidy.. too bad I didn't see that earlier. Its too bad that I could not read the manual at the time.. It worked better when I opened my eyes. ( :=0
So in my test case below, I assigned perl variable $alnum to sec variable %alnum through the eval. The eval exposed the perl variable $alnum for later use. Context expressions that follow can use the values of perl variable $alnum. The leap of faith for me is to treat (believe) perl variable $alnum and sec variable %alnum the same depending on whether they were used as action vs pattern, desc, or the context expression. I suspect that I will have to shadow $alnum as %alnum now, and stop relying upon $foo to carry me through the perl mini code. :={ type=Single desc=Shadow perl and sec alnum variables for time/date ptype=RegExp pattern=SEC_(STARTUP|RESTART|SOFTRESTART) context=[ SEC_INTERNAL_EVENT ] action=eval %YY ( $YY = `/bin/date +%y` ; chomp($YY); return $YY ; ); \ eval %MM ( $MM = `/bin/date +%m` ; chomp($MM); return $MM ; ); \ eval %DD ( $DD = `/bin/date +%d` ; chomp($DD); return $DD ; ); \ logonly "date %{MM}/%{DD}/%{YY}" type=Calendar time=* * * * * desc=todays date is 10/23/2010.. really context= =(($MM == 10) && ($DD == 23) && ($YY == 10)) action=logonly "Todays date is %{MM}/%{DD}/%YY" -- Tim Peiffer Network Support Engineer Office of Information Technology University of Minnesota/NorthernLights GigaPOP +1 612 626-7884 (desk) ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Simple-evcorr-users mailing list Simple-evcorr-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users