Hello,
Am Sonntag, 3. März 2013 schrieb Tanstaafl:
> If all it does is store info for later, why/how does it prevent my
> line from being evaluated if it comes after this line?
That's how the if / elsif / else block works:
The first "true" condition (which is the "/^from:\s*(.*)\n$/i" check for
lines starting with "from:") "wins". This also means that the remaining
"elsif" conditions and the "else" are not even checked.
To give you an (I hope) easily understandable example:
if ( $day == my_birthday ) {
go_out_for_lunch_with_friends;
} elsif ( $day == sunday )
go_to_church;
} else {
go_to_work;
}
This pseudocode translates to:
If it's your birthday, then you go out for lunch with some friends - and
don't care about going to church or your work because you are in the
restaurant with your friends ;-)
If it's not your birthday, then you go (depending on the weekday) to
church or to work.
Well, real life isn't that easy, but you should get the point ;-)
Regards,
Christian Boltz
--
given our recent direction, unmaintainable python would probably be
preferred over unmaintainable perl. :) [Steve Beattie in apparmor]
|