introduction to web programming Using "=>" The => keyword is also useful in making hash definitions more readable. The operator is used to associate keys and values. Thus,

%client_def = {"name", "Selena",
               "phone", "213-234-5068",
               "email", ""};

may also be written as:

%client_def = {"name"  => "Selena",
               "phone" => "213-234-5068",
               "email" => ""};

The primary benefit of this is that it can make complex hash definitions much more readable and intuitive.

Previous | Next | Table of Contents