in reply to multiple commands before unless ?

Nobody mentioned this, so I will: If you're willing to change the order, you can use unless like if:

unless ($something) { first_thing(); second_thing(); many_things(); }
Personally, I think it looks a little better, but it's up to you. I just mentioned it because not everyone is aware that you can use unless in this fashion.

Replies are listed 'Best First'.
Re: Re: multiple commands before unless ?
by emilford (Friar) on Jun 26, 2003 at 16:18 UTC
    I know of this fashion as well, but I wanted to use it in the other direction in this case. Thanks.