#!/usr/bin/perl -w use strict; use Data::Dumper; my @foo = qw/ name Roger age 20 hobby lint /; my %thing = @foo; print Dumper(\%thing);