diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-30 21:27:12 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-30 21:27:12 +0000 |
commit | 16070b82c8557c1a47b3ee4bee2b551efb7b3eb7 (patch) | |
tree | 69ef45dfeac4aa98cbd26d87025f4b28eb4e8423 /pod/perlop.pod | |
parent | 3d1e7443c642b103856ae14dc5e74c2cd625a408 (diff) | |
download | perl-16070b82c8557c1a47b3ee4bee2b551efb7b3eb7.tar.gz |
introduce $^V (eq chr($revision) . chr($version) . chr($subversion));
document version tuples
p4raw-id: //depot/perl@4927
Diffstat (limited to 'pod/perlop.pod')
-rw-r--r-- | pod/perlop.pod | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod index 5a901c00df..68113b79c1 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -1802,6 +1802,17 @@ operation you intend by using C<""> or C<0+>, as in the examples below. See L<perlfunc/vec> for information on how to manipulate individual bits in a bit vector. +=head2 Version tuples + +A version number of the form C<v1.2.3.4> is parsed as a dual-valued literal. +It has the string value of C<"\x{1}\x{2}\x{3}\x{4}"> (i.e., a utf8 string) +and a numeric value of C<1 + 2/1000 + 3/1000000 + 4/1000000000>. This is +useful for representing and comparing version numbers. + +Version tuples are accepted by both C<require> and C<use>. The C<$^V> variable +contains the running Perl interpreter's version in this format. +See L<perlvar/$^V>. + =head2 Integer Arithmetic By default, Perl assumes that it must do most of its arithmetic in @@ -1889,3 +1900,5 @@ limited-precision representations. The non-standard modules SSLeay::BN and Math::Pari provide equivalent functionality (and much more) with a substantial performance savings. + +=cut |