Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Integer Literals in Perl

by root (Monk)
on Nov 05, 1999 at 02:13 UTC ( [id://943]=perltutorial: print w/replies, xml ) Need Help??

Integer literals in Perl are pretty straight forward

Here are some examples
143
-3
-8431
42
0

Theres a little bit more to know about float literals.

Replies are listed 'Best First'.
Re: Integer Literals in Perl
by Anonymous Monk on Mar 27, 2002 at 01:42 UTC
    1_000_000 and -5_5555_5 work fine too.
        -2.3 24

    Log In?
    Username:
    Password:

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

    How do I use this?Last hourOther CB clients
    Other Users?
    Others musing on the Monastery: (4)
    As of 2024-10-07 19:58 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      The PerlMonks site front end has:





      Results (44 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.