just the first quest..
perl -E "say for grep{eval $_ == 100} glob join '{+,-,}',1..9"

PS sorry missed: -1+2-3+4+5+6+78+9

perl -E "say for grep{eval $_ == 100} glob '{-,}'.join '{+,-,}',1..9"

L*

UPDATE Feb 21 2018, just for my own pleasure:

1. Show all solutions that sum to 100
2. Show the sum that has the maximum number of solutions (from zero to infinity*)
3. Show the lowest positive sum that can't be expressed (has no solutions), using the rules for this task
4. Show the ten highest numbers that can be expressed using the rules for this task (extra credit)

perl -MList::Util="first" -E "@c[0..10**6]=(0..10**6);say for grep{$e= +eval;$c[$e]=undef if $e>=0;$h{$e}++;eval $_==100}glob'{-,}'.join'{+,- +,}',1..9;END{say for(sort{$h{$b}<=>$h{$a}}grep{$_>=0}keys %h)[0],firs +t{defined $_}@c;say for(sort{$b<=>$a}grep{$_>0}keys %h)[0..9]}" -1+2-3+4+5+6+78+9 1+2+3-4+5+6+78+9 1+2+34-5+67-8+9 1+23-4+5+6+78-9 1+23-4+56+7+8+9 12+3+4+5-6-7+89 12+3-4+5+67+8+9 12-3-4+5-6+7+89 123+4-5+67-89 123+45-67+8-9 123-4-5-6-7+8-9 123-45-67+89 9 211 123456789 23456790 23456788 12345687 12345669 3456801 3456792 3456790 3456788 3456786

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

In reply to Re: Sum to 100 at Rosetta Code -- oneliner by Discipulus
in thread Sum to 100 at Rosetta Code by choroba

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.