perl-5.34.0
$OLD_PERL_VERSION
$]

The revision, version, and subversion of the Perl interpreter, represented as a decimal of the form 5.XXXYYY, where XXX is the version / 1e3 and YYY is the subversion / 1e6. For example, Perl v5.10.1 would be "5.010001".

5.XXXYYY ���綣���勐����違�ц;�憗�������� Perl ��ゃ�潟�帥����ŝ�帥� revision, version, subversion (XXX ��� version / 1e3��� YYY ��� subversion / 1e6)��� 箴������違�����Perl v5.10.1 ��� "5.010001" ��с�����

This variable can be used to determine whether the Perl interpreter executing a script is in the right range of versions:

��鴻�壔�ŝ�������勖�������с�������勉�鴻�壔�ŝ��������絎�茵������⓾�������ゃ�潟�帥����ŝ�帥�勉����若�吾�с�潟�� ��ï����ɾ����峨����˨�����������茯帥�鴻�������������c�������������с����障��:

    warn "No PerlIO!\n" if "$]" < 5.008;

When comparing $], numeric comparison operators should be used, but the variable should be stringified first to avoid issues where its original numeric value is inaccurate.

$] ���罸�莠������������������医�ゆ��莠�羲�膊�絖����篏帥����������鴻����с�������� �����勖�医�ゃ��筝�罩g∈��ɱ�翫����勐�馹������帥�������������˨����障�����絖���������������鴻����с�����

See also the documentation of use VERSION and require VERSION for a convenient way to fail if the running Perl interpreter is too old.

絎�茵������� Perl ��ゃ�潟�帥����ŝ�帥���𡉴����������翫����̥��篋�������箴水�í�ʋ�号���� ��ゃ����⓾�� use VERSION ��� require VERSION ��勉����㏍�ャ�<�潟����� �����с����☖�����������

See "$^V" for a representation of the Perl version as a version object, which allows more flexible string comparisons.

���������荵���ʋ��絖����罸�莠�����櫝�純�� version ��ŝ����吾�с�壔����������⓾� Perl �����若�吾�с�活;�憗�˨�ゃ����⓾�� "$^V" ��������с����⓾��������������

The main advantage of $] over $^V is that it works the same on any version of Perl. The disadvantages are that it can't easily be compared to versions in other formats (e.g. literal v-strings, "v1.2.3" or version objects) and numeric comparisons are subject to the binary floating point representation; it's good for numeric literal version checks and bad for comparing to a variable that hasn't been sanity-checked.

$^V ���絲障����� $] ��勌源��ɱ�ñ�鴻�壔����í�勉����若�吾�с�潟�� Perl ��с�����罕��� ���篏���������������с����� 罨���鴻�壔��篁���勐��綣���勉����若�吾�с�� (箴������違�ŝ����í�˨�� v-���絖�������"v1.2.3"��� �����若�吾�с�潟�ŝ����吾�с�壔��) ��◐亜������罸�莠���с����������医�ゆ��莠���壔����ゃ���� 羌勐��絨���亥�壕;�憗�˨�ŝ�������<�с��; ��医�ゃ�ŝ����í�˨����若�吾�с�潟����с����壔�������⓾� ��壔����с��������罩f�������с����壔����������⓾����ŝ��紊���違��罸�莠���������˨�虁�壔����ŝ����с�����

The $OLD_PERL_VERSION form was added in Perl v5.20.0 for historical reasons but its use is discouraged. (If your reason to use $] is to run code on old perls then referring to it as $OLD_PERL_VERSION would be self-defeating.)

$OLD_PERL_VERSION ���綣���壩⑳�兏�������宴�˨����� Perl v5.20.0 ��̬申�����������障����������� �����勌戎�����奝���ィ絅���с����� ($] ���篏帥�������宴���𡉴�� perl ��с�潟�若�����絎�茵���������������ŝ�������������� $OLD_PERL_VERSION �����☗����с�������◑�ʋ����������������˨�ŝ����障�����)

Mnemonic: Is this version of perl in the right bracket?

荐���倶��: Perl ��勉����若�吾�с�潟�壔��罩c�����膀���� (right bracket) ��˨�����������