use RPO ; ## Remote Perl Objects ## Set the value of a SCALAR remotely: RPO::CLIENT->eval('$scalar = 123'); ## Get the reference to this SCALAR: my $remote_ref = RPO::CLIENT->eval('\$scalar') ; ## Use the SCALAR reference normally, but making changes remotely: $$remote_ref = 'xyz' ; ## Define $local_scalar as an alias to the remote scalar: my $local_scalar ; RPO::ALIAS(\$local_scalar , $remote_ref) ; ## Append some data to the previous scalar value ('xyz'): $local_scalar .= 'abc' ; ## The remote value now should be 'xyzabc': print RPO::CLIENT->eval('return $scalar') ; #### ## Set the value of a HASH remotely: RPO::CLIENT->eval('%hash = ( a=>1 , b=>2 , c=>{ d=>3.1 , e=>3.2 } )'); ## Get the reference to this HASH: my $ref = RPO::CLIENT->eval('\%hash') ; ## Define the alias: my %hash ; RPO::ALIAS(\%hash , $ref) ; ## store '11': $hash{a} = 11 ; ## fetch 'a': print "$hash{a}\n" ; ## fetch 'c', what returns a new remote HASH ## reference, and fetch 'd': print "$hash{c}{d}\n" ; my $scalar_ref = RPO::CLIENT->eval('\$scalar') ; RPO::ALIAS(\$scalar , $scalar_ref) ; ## fetch 'c', what returns a new remote HASH ## fetch $scalar and ## store into 'e' in the returned HASH in 'c'. $hash{c}{e} = $scalar ;