#!/usr/bin/perl -w use strict; use Data::Dumper; my @ingredients = ( [ qw / onions diced / ], [ qw / potatos diced / ], [ qw / paprika spicy / ], [ qw / salt shaken / ], [ qw / pepper fresh / ] ); my $hash_browns={}; foreach my $ingredient (@ingredients){ $hash_browns -> { $ingredient -> [0] } = $ingredient -> [1]; } foreach my $key ( keys %$hash_browns ){ printf "%s\t%s\n",$key,$hash_browns->{$key}; } #### [pberghol@cowdawg hash]$ perl hash.pl salt shaken onions diced pepper fresh paprika spicy potatos diced [pberghol@cowdawg hash]$ perl hash.pl salt shaken onions diced pepper fresh paprika spicy potatos diced [pberghol@cowdawg hash]$ perl hash.pl salt shaken onions diced pepper fresh paprika spicy potatos diced