my @files = qw( http://use.perl.org/ http://search.cpan.org/ http://jobs.perl.org/ ); my @hash = ( url => '', curArray => [], prevArray => [], ); foreach my $url2 ( @files ) { #push (@hash{url}, $url2); $hash{url} = $url2; }