I want to do something like this...
%jason = (
red => ((//^one/ and /two/) or (/^three/ and /four/)),
green => ((//^five/ and /six) or (/^seven/ and /eight/))
);
foreach $key ( keys %jason ) {
if $jason{$key} {
do_stuff
}
}
but that doesn't work...how do I get this done?
I want the 'if $jason{key}' line to be like I wrote:
if ((//^one/ and /two/) or (/^three/ and /four/))
Hopefully there's an easy way to write what I mean...
%jason = (
red => ((//^one/ and /two/) or (/^three/ and /four/)),
green => ((//^five/ and /six) or (/^seven/ and /eight/))
);
foreach $key ( keys %jason ) {
if $jason{$key} {
do_stuff
}
}
but that doesn't work...how do I get this done?
I want the 'if $jason{key}' line to be like I wrote:
if ((//^one/ and /two/) or (/^three/ and /four/))
Hopefully there's an easy way to write what I mean...