in reply to More Pong in SDL

You should be getting this error:
syntax error at YourCode.pl line xx, near "elsif"
because your sub{} encloses the declaration of "my $event".

Most likely, you have a misplaced "}".

                All power corrupts, but we need electricity.