end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

use $VERSION

perlでは、よく次のようにperl verをuseすることがあります。

#!/usr/local/bin/perl

use strict;
use warnings;
use 5.11.0;

この場合、「perl 5.11.0」以前のperlで実行しようとしても、compile?でabortします。

bash-3.2$ ./foo.pl 
Perl v5.11.0 required--this is only v5.8.8, stopped at ./foo.pl line 7.
BEGIN failed--compilation aborted at ./foo.pl line 7.
bash-3.2$