my @headers = qw(LastName FirstName Age);
my %person; $person{FirstName} = "Michael"; $person{LastName} = "Schwern"; $person{Age} = 29;
foreach my $key (@headers) { print $person{$key}, " | "; } print "\n";
This will print
Schwern | Michael | 29
Not really (Schwern | Michael | 29 | ). This will do:
my @headers = qw(LastName FirstName Age);
my %person; $person{FirstName} = "Michael"; $person{LastName} = "Schwern"; $person{Age} = 29;
print join ' | ', @[EMAIL PROTECTED];