#!/usr/bin/perl use strict; use warnings; use Data::Dumper; # Create an array reference to demo this my $foo_ref = ['a', 'b', 'c', 'd']; # Convert array ref into hash ref and display my $bar_ref = {@{$foo_ref}}; print Dumper $bar_ref; # Convert hash ref into array ref and display my $new_foo_ref = [%{$bar_ref}]; print Dumper $new_foo_ref;