The => keyword is also useful
in making hash definitions more readable. The operator
is used to associate keys and values. Thus,
my %client_def = (
'name', 'Selena',
'phone', '213-234-5068',
'email', 'selena@eff.org'
);
may also be written as:
my %client_def = (
'name' => 'Selena',
'phone' => '213-234-5068',
'email' => 'selena@eff.org'
);
The primary benefit of this
is that it can make complex hash definitions much more readable and
intuitive.