With the onslaught of golf meditations recently (of which I shall soon be posting one -- fear not!), I'm posting a set of reminders that you may be wont to take heed of, ere you post again!

japhy -- Perl and Regex Hacker

Replies are listed 'Best First'.
Re: Golf Do-s and Don't-s
by dragonchild (Archbishop) on Apr 03, 2002 at 15:03 UTC
    A few questions on technique:
    1. Is there anything shorter than join'',?
    2. What are some good sorting techniques?

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

      Is there anything shorter than join'',?

      It depends. This:

      $"="";"@_"
      is one character more than
      join"",@_
      but if you have to do two joins,
      $"="";"@a";"@b"
      is shorter than
      join"","@a";join"","@b"