Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!convex!usenet From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: the version problem Message-ID: <1991Feb11.022847.14573@convex.com> Date: 11 Feb 91 02:28:47 GMT Sender: usenet@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 37 Nntp-Posting-Host: pixel.convex.com It's hard to know if your current version of perl will run the script you just got in the mail if you're not always up-to-date with the Latest and Greatest version of Perl. And just testing $] doesn't always work: what if you're making use of a syntactic enhancement? So I came up with an eval wrapper -- check it out: $Wrapped_Version = '3.044'; $] =~ /(\d+\.\d+).*\nPatch level: (\d+)/; $Current_Version = sprintf("%5.3f", $1 + $2/1000); if ( $Wrapped_Version > $Current_Version) { print STDERR <