in reply to 'or' Bug Bear

As for the multiple actions, instead of

or (print ...; print ...)

use this:

or do {print ...; print ...}

That should do the trick.

One other thing, do use strict, but not inside the subroutine; put it on the top of the script.

Replies are listed 'Best First'.
Re^2: 'or' Bug Bear
by itub (Priest) on Feb 10, 2005 at 14:11 UTC
    Note that the OP was using or (print ..., print ...), not or (print ...; print ...).

    While the do solution you provide is probably better, you can also do or (print(...), print(...)). The parentheses prevent the first print from eating everything that follows as its parameters.