in reply to Re^5: Unicode infinity
in thread Unicode infinity

If you can do this:

perl -Mutf8 -wle 'use constant π=>3.141;use overload "sqrt"=>\&sr;sub sr{sqrt shift}print sr π'
1.77228665852903
This seems reasonable:
perl -Mutf8 -wle 'use constant π=>3.141;use overload "sqrt"=>\&√;sub √{sqrt shift}print √π'    
Unrecognized character \x{221a}

Replies are listed 'Best First'.
Re^7: Unicode infinity
by bliako (Abbot) on Jul 02, 2024 at 18:50 UTC

    nice! Now on to this ❸.❶❹

Re^7: Unicode infinity
by Anonymous Monk on Jul 02, 2024 at 14:26 UTC
    √π looks cool but I know perl needs space √ π or parens √(π).

      Nope, don't need spaces between symbols and identifiers.

      For example,

      1 + length - inf ! f() g( $z )

      can be written as

      1 +length -inf !f() g( $z)

      etc