in reply to Re: GOLF: Input sort list of integers, Output as [356853]
in thread GOLF: Input sort list of integers, Output as [356853]

42:
# 1 2 3 4 #23456789012345678901234567890123456789012 print$/x!$;{$_}++,++$;,") $_-",$;{$_}for@_

Abigail

Replies are listed 'Best First'.
Re: Re: GOLF: Input sort list of integers, Output as [356853]
by tilly (Archbishop) on May 27, 2004 at 15:30 UTC
    I just tried running several of your solutions with the input asked for in the original question. You are missing a newline per number input.

    Look at Problems with looping through an array and you'll see that when presented with a string of 1's you should separate them by returns, and there should be a blank line between groups of numbers. Fixing this output issue adds 3 more characters:

    print$/x!$;{$_}++,++$;,") $_-",$;{$_},$/for@_

    Obviously I need to learn to read better...

      From BrowserUK's challenge:
      Rules: No strict, No warnings, $/="\n" (-l implied).
      (Emphasis mine).

      Abigail