From 7d2b122293d1fdebed97dd499efd7866991df533 Mon Sep 17 00:00:00 2001 From: Dave Mitchell Date: Fri, 19 May 2006 16:06:58 +0000 Subject: [PATCH] give a more useful example for $^V p4raw-id: //depot/perl@28235 --- pod/perlvar.pod | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pod/perlvar.pod b/pod/perlvar.pod index ac75f0c..8552274 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -1169,11 +1169,14 @@ it equals C and will return true for C<$^V eq v5.6.0>. Note that the characters in this string value can potentially be in Unicode range. +This variable first appeared in perl 5.6.0; earlier versions of perl will +see an undefined value. + This 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 "No \"our\" declarations!\n" if $^V and $^V lt v5.6.0; + warn "Hashes not randomized!\n" if !$^V or $^V lt v5.8.1 To convert C<$^V> into its string representation use sprintf()'s C<"%vd"> conversion: -- 2.7.4