[26048] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 8256 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jul 17 09:05:45 2005

Date: Sun, 17 Jul 2005 06:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 17 Jul 2005     Volume: 10 Number: 8256

Today's topics:
    Re: 01.0 == 10 ??? <joe@inwap.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 17 Jul 2005 05:23:37 -0700
From: Joe Smith <joe@inwap.com>
Subject: Re: 01.0 == 10 ???
Message-Id: <Toudne_fRe0h0EffRVn-1w@comcast.com>

kj wrote:

> % perl -wle 'print 01.'
> syntax error at -e line 1, at EOF
> -e had compilation errors.
> % perl -wle 'print 01.0'
> 10

Here's some more:

% perl -le 'print 020.abc'
16abc
% perl -le 'print 009'
Illegal octal digit '9' at -e line 1, at end of line
Execution of -e aborted due to compilation errors.

In the first one, 020 (octal) is 16 (decimal), and barewords
act like quoted literals, same as 'print 16."abc"'.

The second one is self explanatory once you recognize that
a leading zero in numeric literals in the source code indicates
an octal number.  (And "0xFF" is hexadecimal for 255.)
	-Joe


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 8256
***************************************


home help back first fref pref prev next nref lref last post