15 lines
257 B
Perl
15 lines
257 B
Perl
#!/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"; |