use lib qw(./Modules); use Clone qw(clone); use Data::Dumper 'Dumper'; my $struct = { a => 1, b => [2, 2.5] }; print "The original structure:\n"; print Dumper $struct; my $clonedstruct = clone($struct); print "\n\nThe cloned structure:\n"; print Dumper $clonedstruct;