From marc.weinmann.lwed at statefarm.com Tue Nov 5 08:56:43 2002 From: marc.weinmann.lwed at statefarm.com (Marc Weinmann) Date: Mon Aug 2 21:24:26 2004 Subject: [Bloomington-normal-pm] Meeting tomorrow 7:30pm @ Crazy Planet Kitchen in downtown BLOOO OMINGTON Message-ID: Skipped content of type multipart/alternative From marc.weinmann.lwed at statefarm.com Thu Nov 7 08:52:06 2002 From: marc.weinmann.lwed at statefarm.com (Marc Weinmann) Date: Mon Aug 2 21:24:26 2004 Subject: [Bloomington-normal-pm] file streams... Message-ID: Skipped content of type multipart/alternative From pawinan at ilstu.edu Thu Nov 7 10:33:37 2002 From: pawinan at ilstu.edu (Phil Winans) Date: Mon Aug 2 21:24:26 2004 Subject: [Bloomington-normal-pm] Finding the version of Perl: $] vs. $^V Message-ID: Last night at the meeting Chuck pointed out that $] can be used to return the version of Perl. This is true: perl -wle 'print $]' => 5.006001 Marc mentioned that the method he was using to get the version of Perl wasn't giving pretty output when printed. perldoc perlvar for 5.6.x has the answers: Regarding $]: The use of this variable is deprecated. The floating point representation can sometimes lead to inaccurate numeric comparisons. See "$^V" for a more modern representation of the Perl version that allows accurate string comparisons. And for $^V (which didn't exist prior to 5.6.0): $^V The revision, version, and subversion of the Perl interpreter, represented as a string composed of characters with those ordinals. Thus in Perl v5.6.0 it equals "chr(5) . chr(6) . chr(0)" and will return true for "$^V eq v5.6.0". Note that the characters in this string value can potentially be in Unicode range. So since $] is deprecated and we want to use $^V, the best method I can think of for nicely printing the version in $^V is this: perl -wle 'print join(".", map(ord, split(//, $^V)))' => 5.6.1 -- Phil Winans - pawinan@ilstu.edu Network Engineer Telecommunications and Network Support Services Illinois State University From pawinan at ilstu.edu Thu Nov 7 11:19:34 2002 From: pawinan at ilstu.edu (Phil Winans) Date: Mon Aug 2 21:24:26 2004 Subject: [Bloomington-normal-pm] Another way to get readable version from $^V Message-ID: Found this in perldoc perldelta: Also, "sprintf" and "printf" support the Perl-specific format flag "%v" to print ordinals of characters in arbitrary strings: printf "v%vd", $^V; # prints current version, such as "v5.5.650" This is probably faster than the method I previously posted. -- Phil Winans - pawinan@ilstu.edu Network Engineer Telecommunications and Network Support Services Illinois State University From chuck.harper.j382 at statefarm.com Thu Nov 7 13:43:33 2002 From: chuck.harper.j382 at statefarm.com (Chuck Harper) Date: Mon Aug 2 21:24:26 2004 Subject: [Bloomington-normal-pm] search page for Perl library Message-ID: <230610DCABB3D44B8971D602025F5C8A05332C6B@nsbrb3c.opr.statefarm.org> Skipped content of type multipart/alternative