say "Happy new year $sum!!! :)"

Best obfuscated wishes! ;)
- Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re: $sum += $_ ** 3 for 1..9
by choroba (Cardinal) on Dec 31, 2024 at 17:35 UTC
    $s += $_ for 1 .. 9; say 'Happy ', $s ** 2, ' to you, too!'
    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      Cool and this equivalence is true for any sequence 1..n .

      ( Not very hard to prove :)

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery

Re: $sum += $_ ** 3 for 1..9
by Arunbear (Prior) on Jan 01, 2025 at 11:43 UTC
    To save some typing:
    perl -E '$sum += $_ ** 3 for 1..9; say "¡Próspero año $sum!"'