use strict; use warnings; use Data::Dumper; my @array1 = [ "test", "test2", "test2", "test3", "test4", "test4" ]; printf "Contents of 'array1' => %s\n", Dumper(\@array1); my @array2 = ( "test", "test2", "test2", "test3", "test4", "test4" ); printf "Contents of 'array2' => %s\n", Dumper(\@array2); # Output will be as follows ... Contents of 'array1' => $VAR1 = [ [ 'test', 'test2', 'test2', 'test3', 'test4', 'test4' ] ]; Contents of 'array2' => $VAR1 = [ 'test', 'test2', 'test2', 'test3', 'test4', 'test4' ];