in reply to Hash of arrays.. can't shift on derefferenced array
which produces as output#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %hoa = ( a => ["apple", "aardvark"], b => ["banana", "bandana"], ); foreach my $head (keys %hoa) { my @data = @{$hoa{$head}}; my $item = shift(@data); print "$item,"; } print $/;
apple,banana,
|
|---|