in reply to Hash name variable substitution

Hey peterb, are you looking for something like this?

#!/perl/bin/perl -w use strict; use Data::Dumper; my $data = [ { _name => "John Smith", _address1 => "123 Foo St.", _address2 => "Apt 5", }, { _name => "Brigitte Nelson", _address1 => "150 Park Pl.", _address2 => "Suite 223", }, ]; my @cols = qw / _name _address1 _address2 /; for my $customer (@$data) { for my $col (@cols) { printf "%s => %s\n", $col, $customer->{$col} || "<empty>"; } }

Updated: Added <empty> string in case of emptiness...


Where do you want *them* to go today?