The hash %ENV contains your current environment. Setting a value in ENV changes the environment for any child processes you subsequently fork() off.

��������激�� %ENV ��˨�壔�������勖����鴻�勛�医��紊���違��荐㊤����������⓾����障����� ENV �����ゃ��荐㊤����������������с�� 篁ュ����� fork() ������絖������㏍�祉�鴻�勛�医��紊���違��紊���眼����障�����

As of v5.18.0, both keys and values stored in %ENV are stringified.

v5.18.0 ���������%ENV ��̬��絎������������㏍�若����ゃ�勌検��鴻�壩��絖���������������障�����

    my $foo = 1;
    $ENV{'bar'} = \$foo;
    if( ref $ENV{'bar'} ) {
        say "Pre 5.18.0 Behaviour";
    } else {
        say "Post 5.18.0 Behaviour";

Previously, only child processes received stringified values:


    my $foo = 1;
    $ENV{'bar'} = \$foo;

    # Always printed 'non ref'
    system($^X, '-e',
           q/print ( ref $ENV{'bar'}  ? 'ref' : 'non ref' ) /);

This happens because you can't really share arbitrary data structures with foreign processes.

��������壔��紊���������㏍�祉�鴻����㋚����˩算�����勉����若�炊����������掩�������������������с����ŝ���������� 莎激����障�����