in reply to empty 'else' block

++Zaxo. There's no need to use else unless you need it - it just adds to the length of your code. I often do something like:
print "Items " . join(', ', @items) . " have been found.\n" if $#items + != -1;

Replies are listed 'Best First'.
Re^2: empty 'else' block
by dragonchild (Archbishop) on Nov 20, 2004 at 20:22 UTC
    Completely offtopic, but that can be better written as:
    print "Items " . join(', ', @items) . " have been found.\n" if @items;

    It's a little easier to read, imho.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.