Skip to main content
Added explanation, used say to make it more like lolcode
Source Link

Perl 6, 13 bytes

putsay sum lines 

Try it

Explanation

  • lines() returns a list of lines from $*IN or $*ARGFILES a “magic” command-line input handle.
  • sum(…) was added to Perl 6 to allow [+] List to be optimized for Positionals that can calculate their sum without generating all of their values like 1..100000
    (I just thought sum was just too cute here to use [+] like I normally would)
  • say(…) call the .gist method on its input, and prints it with an additional newline.

Perl 6, 13 bytes

put sum lines 

Try it

Perl 6, 13 bytes

say sum lines 

Try it

Explanation

  • lines() returns a list of lines from $*IN or $*ARGFILES a “magic” command-line input handle.
  • sum(…) was added to Perl 6 to allow [+] List to be optimized for Positionals that can calculate their sum without generating all of their values like 1..100000
    (I just thought sum was just too cute here to use [+] like I normally would)
  • say(…) call the .gist method on its input, and prints it with an additional newline.
Source Link

Perl 6, 13 bytes

put sum lines 

Try it