List context and hash context
#!/usr/bin/perl -w
use strict;
my %person = (
name => 'Joe',
age => 13,
phone => '555-1212',
city => 'Chicago'
);
my @data = %person;
print "list context: ", join("|", @data), "\n";
print "another way: ", %person, "\n";
Related examples in the same category