use Variable::Magic qw( cast wizard ); # The C var $^T mirrors is named PL_basetime # An IV (signed integer) on all systems except OS/2 and VMS. my $PL_basetime; cast($^T, wizard( # Copies into $^T before fetching from it. get => sub { ${ $_[0] } = $PL_basetime; }, # Copies from $^T after assigning to it. set => sub { $PL_basetime = ${ $_[0] }; }, ));