my %commands = ( "set time" => sub { print "nMetrics>You have entered the settime command\n"; print "nMetrics>The argument given is $_[0]\n"; }, "show time" => sub { print "nMetrics>You have entered the show time command\n"; }, default => sub { print "nMetrics>Invalid command line options\n"; } );