- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
RRP £29.95 ($39.95)

Sales of this book support The Perl Foundation! Get a printed copy>>>



The revision, version, and subversion of the Perl interpreter, represented as a version object.

This variable first appeared in perl 5.6.0; earlier versions of perl will see an undefined value. Before perl 5.10.0 $^V was represented as a v-string.

$^V can be used to determine whether the Perl interpreter executing a script is in the right range of versions. (Mnemonic: use ^V for Version Control.) Example:

warn "Hashes not randomized!\n" if !$^V or $^V lt v5.8.1

To convert $^V into its string representation use sprintf()'s "%vd" conversion:

printf "version is v%vd\n", $^V;  # Perl's version

See the documentation of use VERSION and require VERSION for a convenient way to fail if the running Perl interpreter is too old.

See also $] for an older representation of the Perl version.

ISBN 9781906966027Perl Language Reference ManualSee the print edition