#! use Data::Dumper; use strict; use warnings; sub f { # (0) # }; my $str; my $ref=[1,2]; print Data::Dumper->Dump([\$ref],[qw(*ref)]); # (1) $str=''.$ref; print Data::Dumper->Dump([\$str],[qw(*str)]); # what do I need to do to $str so that (2) dump the original data structure my $newref=f($str); print Data::Dumper->Dump([\$newref],[qw(*newref)]);# (2)