From: Dave Mitchell Date: Fri, 19 May 2006 16:06:58 +0000 (+0000) Subject: give a more useful example for $^V X-Git-Tag: accepted/trunk/20130322.191538~17615 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d2b122293d1fdebed97dd499efd7866991df533;p=platform%2Fupstream%2Fperl.git give a more useful example for $^V p4raw-id: //depot/perl@28235 --- 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: