Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^6: Unicode infinity

by Anonymous Monk
on Jul 02, 2024 at 14:19 UTC ( [id://11160314]=note: print w/replies, xml ) Need Help??


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

    I think you opened a can of worms :) next will be <= and >= and what about thumbs-up for if(👍 $x){}.

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11160314]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-09-18 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (24 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.