%Verbs = ( "arm" => { description => " A prerequisite command for a potentially hazardous command. ", discrete => 1, }, "close" => { description => " Mechanically close a device controlled by the command element. \\emph{close} works in conjunction with the \\emph{open} verb. ", discrete => 1, }, "disable" => { description => " Deactivate a capability or function. \\emph{disable} works in conjunction with the \\emph{enable} verb. ", discrete => 1, }, "dump" => { description => " Copy a specific data buffer of the command element to telemetry. ", discrete => 0, }, "enable" => { description => " Activate a capability or function. \\emph{enable} works in conjunction with the \\emph{disable} verb. ", discrete => 1, }, ); #### #!/usr/bin/perl -w use strict; use Template; do 'cmd_verbs_test.pm'; print ("Hello!\n"); #do 'cmd_verbs_test.pm'; # opens file with Verbs hash foreach my $cmd (sort keys %Verbs){ # sets value to description text without preceeding or ending newlines and spaces my $desc = $Verbs{$cmd}{description}; print("Command: $cmd \n"); print("Description: $desc \n"); print("Discrete: $Verbs{$cmd}{discrete} \n\n"); } print("Done!\n");